If you run a Play mode test in the same way as an Editor test, it runs inside the Unity Editor. You can also run Play mode tests on specific platforms. Select the Player tab to build and run your tests on the currently active target platform.
Your current platform shows at the top of the Test Runner window. For example, in the image above, the bar above the search bar reads Running in StandaloneOSX, because the current platform is MacOS. The target platform is always the active platform profile selected in Build ProfilesA set of customizable configuration settings to use when creating a build for your target platform. More info
See in Glossary (menu: File > Build Profiles).
The test result displays in the build once the test completes:
The application running on the platform reports back the test results to the Editor UI then displays the executed tests and shuts down. Some platforms don’t support shutting down the Player application with Application.Quit
so it continues running after reporting the test results.
To make sure you receive the test results from the Player on your target platform back into the Editor that’s running the test, both must be on the same network. If Unity can’t instantiate the connection, you can see the tests succeed in the running application. Running tests on platforms with arguments, in this state, does not provide XML test results.
You can use the dropdown selector next to the Run All button to build a Player with all the tests, or a selected subset of tests, without running it.
In some cases the available selections are different. If the selected platform is Android or iOS and Export Project is enabled in Build Profiles, the selections are Export All Tests and Export Selected Tests.