- Home /
How to run unit tests in Unity Cloud Build with Unity 5.3+
In the Unity Cloud Build there is a configuration options for automated testing:
Run Unit Tests true Fail Build On Test Fail true Unit Test Method UnityTest.Batch.RunUnitTests
However, the method UnityTest.Batch.RunUnitTests became deprecated in Unity 5.3 when the Unity Test Tools were integrated into the Editor Test Runner (https://bitbucket.org/Unity-Technologies/unitytesttools/wiki/Home)
The command line option for running the Editor Tests is now also different.
// Old Way
Unity.exe -projectPath %PROJECT_PATH% -batchmode -quit -executeMethod UnityTest.Batch.RunUnitTests -resultFilePath=%PROJECT_PATH%
// New Way
Unity.exe -runTests -projectPath %PROJECT_PATH% -batchmode -quit -testResults %RESULT_PATH% -testPlatform editmode
How do I get the Unity Cloud Build to run unit tests after Unity 5.3?