Class ExecutionSettings
A set of execution settings defining how to run tests, using the TestRunnerApi.
Namespace: UnityEditor.TestTools.TestRunner.Api
Syntax
[Serializable]
public class ExecutionSettings : ISerializationCallbackReceiver
Constructors
ExecutionSettings(Filter[])
Creates an instance with a given set of filters, if any.
Declaration
public ExecutionSettings(params Filter[] filtersToExecute)
Parameters
| Type | Name | Description |
|---|---|---|
| Filter[] | filtersToExecute | Set of filters |
Fields
customRunnerName
Declaration
[SerializeField]
public string customRunnerName
Field Value
| Type | Description |
|---|---|
| String |
filters
A collection of Filter to execute tests on.
Declaration
[SerializeField]
public Filter[] filters
Field Value
| Type | Description |
|---|---|
| Filter[] |
overloadTestRunSettings
An instance of ITestRunSettings to set up before running tests on a Player.
Declaration
public ITestRunSettings overloadTestRunSettings
Field Value
| Type | Description |
|---|---|
| ITestRunSettings |
playerHeartbeatTimeout
The time, in seconds, the editor should wait for heartbeats after starting a test run on a player. This defaults to 10 minutes.
Declaration
[SerializeField]
public int playerHeartbeatTimeout
Field Value
| Type | Description |
|---|---|
| Int32 |
runSynchronously
Note that this is only supported for EditMode tests, and that tests which take multiple frames (i.e. [UnityTest] tests, or tests with [UnitySetUp] or [UnityTearDown] scaffolding) will be filtered out.
Declaration
[SerializeField]
public bool runSynchronously
Field Value
| Type | Description |
|---|---|
| Boolean | If true, the call to Execute() will run tests synchronously, guaranteeing that all tests have finished running by the time the call returns. |
Properties
IsBuildOnly
Declaration
[SerializeField]
public bool IsBuildOnly { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
playerSavePath
Declaration
public string playerSavePath { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
targetPlatform
The BuildTarget platform to run the test on. If set to null, then the Editor is the target for the tests.
Declaration
public BuildTarget? targetPlatform { get; set; }
Property Value
| Type | Description |
|---|---|
| Nullable<BuildTarget> |
Methods
OnAfterDeserialize()
Declaration
public void OnAfterDeserialize()
Implements
OnBeforeSerialize()
Declaration
public void OnBeforeSerialize()
Implements
ToString()
Implementation of ToString() that builds a string composed of the execution settings.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String | The current execution settings as a string. |