Requires Unity 4.0.0 or higher.
Unity Test Tools allows you to test Unity content.
- Unit Test Framework
- Integration Test Framework
- Assertion Component
- Integrated IDE, batch mode runners and integration tests player runner
Source code is now hosted on Bitbucket.
Documentation (English and Japanese)
Examples are included in the package.
For feedback and question please use Unity Forums or Bitbucket's Issue Tracker.
SORT BY RELEVANCE / POPULARITY / NAME / PRICE / RATING / RELEASE DATE
1 year ago
Most awaited feature from developers! But what about Mocks? How to mock existing MonoBehavior in unit test?
Maybe you will find this helpful //blogs.unity3d.com/2014/06/03/unit-testing-part-2-unit-testing-monobehaviours/
Ok, this plugin made me very happy.Answering the guy above, how I use the mocks here (with NSubstitute)Suppose the MonoBehaviour class name is Player:1. Create a IPlayer interface.2. Make the Player implements it.3. In the test, write IPlayer p = Substitute.For<IPlayer>()4. Use the 'p' mock object to make the operations.5. These operations you can check at http://nsubstitute.github.io/I've found a (possible) bug though. When I make a TestFixture class extends another TestFixture class, the Test Runner window goes buggy, showing the same test more than once.
Hi Ramon,Nice spot! We'll give it a look before next release.Tomek
I wish there have more tutorials about this tool, so we can use up all of its power. So far, 1 manual and 1 live training tutorial do help to get to know about it, but I just want more :)[Edit]I know this tool was meant for testing purposes. Can u guys add debugging features also? For example, I put some breakpoints in my code, and the game will pause at a breakpoint, so that I can visually check between my code and game view of what's going on during a frame process. Another one, after one assertion threw a true-pass or a false-exception, can I continue my game to check the other assertions, something like I can go through all my assertions, step by step, ...Sorry, my English is not good, I hope u guys understand what I mean. Thanks.