Unity Test Tools

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.
 
Originally released: 18 December 2013
Package has been submitted using Unity 4.0.0, 4.2.2, 5.0.0, 5.1.0, and 5.3.0 to improve compatibility within the range of these versions of Unity.

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

Recommendations

1-3 of 30

Customers also purchased

1-3 of 30

User Reviews

2 years ago

This review was submitted for a previous version of the package.


Wow

(20 of 20 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

2 years ago

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

2 years ago

This review was submitted for a previous version of the package.


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

2 years ago

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

2 years ago

This review was submitted for a previous version of the package.


Love It. Wish more tutorials!

(7 of 9 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