Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Running tests from code

Run tests from code with the TestRunnerAPI.
Read time 1 minuteLast updated 7 days ago

You can invoke Unity Test Framework's test runner from code with the
TestRunnerAPI
class, which lets you control which tests are run and retrieve test data and results.

Topic

Description

Specify which tests to runCompose
Filter
objects for the
TestRunnerAPI
to determine which tests to include in a test run.
Retrieving test resultsRegister to receive callbacks from the test runner at the start or finish of an active test run or individual test.
Retrieve the list of testsRetrieve the test tree for a given test mode (Edit mode or Play mode) from the test runner.

Additional resources