Question by
mikeburnsshadow · Oct 02, 2017 at 09:28 PM ·
testingintegrationcommand-linebatchmode
Running UnityTest.Batch.RunIntegrationTests in batchmode throws exception
Hey there, trying to run UnityTest.Batch.RunIntegrationTests via batchmode with the following bat script:
cd C:\Program Files\Unity537\Editor\
start /WAIT Unity.exe -batchmode -projectPath C:\Users\Admin\Documents\MyProject -executeMethod UnityTest.Batch.RunIntegrationTests -testscenes=MyTestScene -resultsFileDirectory=C:\temp\
pause
Upon trying this, the result is the following:
Aborting batchmode due to failure:
executeMethod method UnityTest.Batch.RunIntegrationTests threw exception.
Running integration tests in editor works fine. I am on Unity 5.3.7f1. Anyone know how to resolve this or how to get more debug info? Can't find a log file in the supplied directory or the Unity directory.
Comment
Best Answer
Answer by mikeburnsshadow · Oct 03, 2017 at 05:49 PM
Log file documentation reveals that I was looking in the wrong spot for the log file: https://docs.unity3d.com/Manual/LogFiles.html
Upon inspection, UnityTest.Batch was trying to use SceneManager.LoadScene instead of EditorSceneManager.OpenScene. Correcting this resolved the problem.
Your answer
