Skip to content
SashaG-T edited this page Apr 10, 2017 · 4 revisions

SingedFeathers Unity project and CoreGame

  • The tests for our CoreGame logic (which is used by the SingedFeather project that contains the code for our View) are within the SingedFeathers/Assets/Editor/ folder. This is for easy compatibility with running them inside the Unity Editor as well as on Travis.
  • They are subdivided into 'UnitTests' and 'IntegrationTests'

Running Unit & Integration Tests

  • From inside Unity navigate the menubar to Window -> Editor Tests Runner and clicking Run All or...
  • Build the project for Release in monodevelop then from the command line type nunit-console ./SingedFeathers/Temp/bin/Release/Assembly-CSharp-Editor.dll

Running Acceptance Tests

  • From inside Unity navigate the project window to the UITest/ folder and open up the TestRunner.unity scene. Once open click the Editor Play button. The TestRunner scene will run all the acceptance tests. The information about the tests is printed to the Unity console. You can also see the tests pass/fail status' in the game object inspector when you have the testrunner game object selected in the hirearchy window.
  • It should be noted that the TestRunner scene, even when all test have been completed, does not stop the player. This must be done manually by pressing the Editor Play button when the tests have completed. To know if the test have completed check Unity's console.