Namespace UnityEditor.TestTools.TestRunner.Api
Classes
CustomRunnerBase
ExecutionSettings
A set of execution settings defining how to run tests, using the TestRunnerApi.
Filter
The filter class provides the TestRunnerApi with a specification of what tests to run when running tests programmatically.
RunnerNotFoundException
Exception for if a runner with a given guid could not be found.
TestRunnerApi
The TestRunnerApi retrieves and runs tests programmatically from code inside the project, or inside other packages. TestRunnerApi is a ScriptableObject. You can initialize the API like this:
var testRunnerApi = ScriptableObject.CreateInstance<TestRunnerApi>();
You can subscribe and receive test results in one instance of the API, even if the run starts from another instance. The TestRunnerApi supports the following workflows:
Note: Non-static methods in this class will become obsolete in future versions so you should use the static methods (e.g. RegisterTestCallback, ExecuteTestRun) rather than their non-static equivalents (e.g. RegisterCallbacks, Execute).
Interfaces
ICallbacks
Callbacks in the TestRunnerApi for the test stages when running tests.
IErrorCallbacks
An extended version of the ICallbacks, which get invoked if the test run fails due to a build error or if any IPrebuildSetup has a failure.
ITestAdaptor
ITestAdaptor
is a representation of a node in the test tree implemented as a wrapper around the NUnit ITest interface.
ITestResultAdaptor
The ITestResultAdaptor
�is the representation of the test results for a node in the test tree implemented as a wrapper around the NUnit ITest interface.
ITestRunSettings
ITestRunSettings lets you set any of the global settings right before building a Player for a test run and then reverts the settings afterward. ITestRunSettings implements IDisposable, and runs after building the Player with tests.
Enums
AssemblyType
Enum flags indicating if an assembly is editor only or if the assembly supports both editor and platforms.
RunState
The RunState enum indicates whether a test can be executed.
TestMode
A flag indicating whether to run Edit Mode or Play Mode tests.
TestStatus
The TestStatus enum indicates the test result status.