uTest is a system testing framework that allows you to easily create distributed system tests that execute over multiple processes, for Unity. The lack of off-the-shelf solutions for testing networked Unity applications is what drove us to develop uTest, and it is indeed used in most of MuchDifferent's projects.
Check out the Getting Started chapter to get testing using uTest ASAP. If unfamiliar with system testing, you may also wish to read our general chapter on testing multiplayer games. uTest is presently aimed only for functional testing, and you might wish to look at our uSuite Load Tester for a solution to load tests of Unity servers.
uTest as a tool provides everything you need to perform functional system testing of networked software, while integrating closely with Unity. Here is a non-exhaustive list:
- Simple and straightforward API inspired by NUnit (with the same assertions)
- Coroutines familiar from Unity allowing linear execution of tests, without callbacks
- Node synchronization through barriers
- Logging of all nodes
- Timeouts and failure handling
- Support for different process models: Isolated processes, threaded AppDomains, sequential
A distributed test written in uTest works like the following:
- uTest is started and given a class containing the code for a test. This class contains the code for each node in a separate method.
- All the node processes of the test are started and initialised but without starting the test.
- When all nodes are ready, the test is started. All nodes begin executing their test code.
- The test runs until all nodes have finished, either by finishing running their test code or by failing.
- The results for each node are gathered and a final result for the test is determined.
- All node processes are closed.
- The final result is presented to the user.
uTest is presently in closed beta and under development. Upcoming extensions to existing functionality include: