文档

Unity Engine

Unity Engine

Run tests from the command line

Run tests from the Editor command line with Unity Test Framework's command-line arguments.
阅读时间1 分钟最后更新于 1 个月前

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
注意
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