Skip to content

Instantly share code, notes, and snippets.

@hagish
Created May 11, 2014 18:28
Show Gist options
  • Save hagish/df9394c90da9a0b17d89 to your computer and use it in GitHub Desktop.
Save hagish/df9394c90da9a0b17d89 to your computer and use it in GitHub Desktop.
running unity unit tests in jenkins
prerequisite
* jenkins on windows
* unity on windows
* YOUR_UNIT_PROJECT contains the unity project in the jenkins workspace
howto
* UNTIY: install Unity Test Tools https://www.assetstore.unity3d.com/#/content/13802
* UNITY: write some unit tests
* JENKINS: add build step "Execute windows batch command" with "run_tests.bat"
* JENKINS: add build set "Publish NUnit test result report" with "unity_unittests_results.xml"
"C:\Program Files (x86)\Unity\Editor\Unity.exe" -nographics -quit -batchmode -projectPath "%CD%\YOUR_UNIT_PROJECT" -logFile "%CD%\unity_unittests_results.log" -executeMethod UnityTest.Batch.RunUnitTests -resultFilePath="%CD%\unity_unittests_results.xml"
exit /b 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment