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?
1 Like
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
3 Likes
@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.
1 Like
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): Unity Test Runner docs - Google Docs
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.
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…
4 Likes