Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

Integration testing support in 5.6

Discussion in '5.6 Beta' started by Deleted User, Mar 13, 2017.

  1. Deleted User

    Deleted User

    Guest

    The existing Unity Test Tools package (see https://bitbucket.org/Unity-Technologies/unitytesttools/) contains a warning:

    "DEPRECATED This package will not be supported anymore. We introduced an integrated test runner in Unity 5.6 and will focus on developing it."

    The test tools package originally contained code for (a) unit testing, (b) integration testing and (c) assertions. Unit testing and assertions are now available in the Unity framework itself, but I cannot find anything for integration testing.

    So what is happening for integration testing in 5.6?
     
    Arkade likes this.
  2. Tomek-Paszek

    Tomek-Paszek

    Unity Technologies

    Joined:
    Nov 13, 2012
    Posts:
    116
    The PlayMode tests will serve as integration tests. Currectly there is no "visual" part (like scene-based tests) but you can write tests that will run in playmode. Eventualy we would like to add a scene-based-like tests but it's a plan for the future
     
    McGravity, akuno and AdamKane like this.
  3. Deleted User

    Deleted User

    Guest

    @Tomek-Paszek Thanks for replying. Do you know when (roughly) the new test framework will be released? Do the new tests cover multiple frames? It seems that the new tests will not deliver as much as the existing integration tests, though. It would be nice to be able to test games using an automated runner.
     
    Tenuous likes this.
  4. Tomek-Paszek

    Tomek-Paszek

    Unity Technologies

    Joined:
    Nov 13, 2012
    Posts:
    116
    It's out in 5.6. The Editor Test Runner got renamed to Test Runner and and now has a PlayMode tab. A brief documentation (not sure if it was officially published so I'm posting a draft (might be out of date eventually): https://docs.google.com/document/d/13zXykcNGMKl7gL0zbh3RSx4lT11qBnOV0JrKAKVxhJk/edit?usp=sharing

    >Do the new tests cover multiple frames?
    yes

    >It seems that the new tests will not deliver as much as the existing integration tests, though. It would be nice to be able to test games using an automated runner.
    They deliver more functionality. You can skip frames + have most of NUnit functionality. There is just no "visual" layer. You can't create tests visually (out of the box) but implementing such solution shouldn't be hard, if you really want it now.
     
  5. Deleted User

    Deleted User

    Guest

    OK, I think I get it. So if I want to check that two objects will collide (as, in fact, I do want) (a) I cannot set up a scene using the editor but (b) I can call some Unity API methods to instantiate the objects. So I cannot actually see the results on the screen but I can check the results using code. That should meet a lot of my concerns as the code monkey who is pushing for automated testing. I expect that the game designers would like to see the results on screen, though, so it would be nice if Unity put visual feedback into their functionality request backlog..
     
unityunity