To create a test through the Test RunnerThe Test Framework package (formerly called the Test Runner) is a Unity tool that tests your code in both Edit mode and Play mode, and also on target platforms such as Standalone, Android, or iOS. More info
See in Glossary window:
Alternatively, use the Asset menu:
This creates a NewTestScript.cs
file in the Tests
folder with some sample tests to get you started. Change the name of the script, if necessary, and press Enter to accept it.
The Test Runner window now displays the sample tests:
You can now open the tests for editing in your IDE.
The process for creating a Play mode test is the same as for creating an Edit mode test. The only difference is that Play mode tests that need to run in a standalone platform Player should be in an assembly that references the required platform.