Namespace UnityEditor.TestTools.TestRunner.Api
Classes
ExecutionSettings
A set of execution settings defining how to run tests, using the Test
Filter
The filter class provides the Test
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>();
Note: 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:
Interfaces
ICallbacks
Callbacks in the Test
IErrorCallbacks
An extended version of the ICallbacks, which get invoked if the test run fails due to a build error or if any IPrebuild
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
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.