Version: Unity 6.2 (6000.2)
Language : English
Run tests in the Test Runner window
Running tests from code

Run tests from the command line

You can run a test project from the Unity Editor command line. The following example demonstrates this on Windows:

Unity.exe -runTests -batchmode -projectPath PATH_TO_YOUR_PROJECT -testResults C:\temp\results.xml -testPlatform PS4

Note: Use the -batchmode option when running tests on the command line to remove the need for manual user inputs. For more information, refer to Unity Editor command-line arguments.

For the full list of Editor command line arguments provided by Unity Test Framework, refer to Command-line reference.

Additional resources

Run tests in the Test Runner window
Running tests from code
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961