Unity Test Tools

Category: Editor Extensions/Utilities
Publisher: Unity Technologies
Rating:
(222)

Price: Free

Requires Unity 4.0.0 or higher.

Unity Test Tools allows you to test Unity content.

Features:
- 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.

Package Contents

UnityTestTools
Assertions
AssertionComponent.cs
AssertionException.cs
Assertions.cs
CheckMethod.cs
Comparers
ActionBase.cs
BoolComparer.cs
ColliderComparer.cs
ComparerBase.cs
FloatComparer.cs
GeneralComparer.cs
IntComparer.cs
IsRenderedByCamera.cs
StringComparer.cs
TransformComparer.cs
ValueDoesNotChange.cs
Vector2Comparer.cs
Vector3Comparer.cs
Vector4Comparer.cs
VectorComparerBase.cs
Editor
AssertionComponentEditor.cs
AssertionExplorerWindow.cs
AssertionListRenderer.cs
AssertionStripper.cs
DropDownControl.cs
GroupByComparerRenderer.cs
GroupByExecutionMethodRenderer.cs
GroupByGORenderer.cs
GroupByNothingRenderer.cs
GroupByTestsRenderer.cs
PropertyPathSelector.cs
PropertyResolver.cs
InvalidPathException.cs
MemberResolver.cs
changelog.txt
Common
Editor
Icons.cs

User Reviews

1 year ago

Good job

(17 of 19 found this review helpful)

Most awaited feature from developers! But what about Mocks? How to mock existing MonoBehavior in unit test?

Reply from publisher

1 year ago

Maybe you will find this helpful //blogs.unity3d.com/2014/06/03/unit-testing-part-2-unit-testing-monobehaviours/

1 year ago

Wow

(14 of 14 found this review helpful)

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.

Reply from publisher

1 year ago

Hi Ramon,
Nice spot! We'll give it a look before next release.
Tomek

1 year ago

Love It. Wish more tutorials!

(5 of 5 found this review helpful)

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.

All prices are exclusive of VAT