TestMatrix: Unit Testing

TestMatrix makes it easy to run and analyze your unit tests, no matter your choice of framework. TestMatrix supports most of the popular unit testing frameworks: NUnit, MbUnit, CsUnit. (Support for XUnit, and MSTest are also in the works). Support is automatic and transparent. You can even mix and match your choice of frameworks as necessary.

100% compatible with your existing tests

All testing features are built atop stock framework cores. Because this integration works without replacing the testing library or breaking compatibility, there is no need to modify your unit tests or abandon current processes such as continuous integration testing, nightly builds, and so forth. TestMatrix doesn't try to replace your unit testing process, it just takes it to the next level by moving developer testing out of external tools and into the editor. If you are new to unit testing, then TestMatrix is the easiest way to get started with this powerful technique, and you can be assured that you are building on a firm foundation.

Run unit tests as easily as compiling

With TestMatrix, running your solution's unit tests is as easy as compiling. You can start your tests from the TestMatrix menu, via hot key, context menus in the editor and Solution Explorer, or interactively through the Test Explorer. TestMatrix will even build your projects before running your tests when necessary. That means you can run your unit tests as part of your compilation and get instant results. Test your entire solution all at once, just run the test your are currently editing, or anything in between. TestMatrix make it easy to continuously test your code every step of the way. No excuses, no roadblocks, no hassles.

View all your tests in one easy interface

Everyone has their own style of organizing their unit tests. Unit tests can be bundled into their own assembly, managed by separate namespaces, or coded directly into your application classes. The Test Explorer panel automatically discovers all of the tests in your solution, and organizes them by assembly, namespace, and category into a familiar explorer style interface. You can use the Test Explorer to browse, navigate through and execute any of the unit tests in your solution. To edit or review a test case, simply click on its icon in the Test Explorer.

The Test Explorer allows you to selectively run any combination of unit tests you would like. You can select individual test cases, specific test fixtures, all tests in a given namespace or project, and many any other combinations. Test Explorer lets you select or exclude entire projects or namespaces with one click. Tests are automatically grouped by category and status, making it easy to skip long running tests or focus on a particular segment of your application. You can even create your own test groups, givng you the ability to package your tests into arbitrary collections, giving you more flexibility when running your tests.

Run unit tests directly from the editor

You can run and debug your tests directly from the editor itself via hot key or context menu, keeping your hands on the keyboard where they belong. Just use the Ctrl+R+T hot key while the cursor is on a test fixture or suite to run it. Test results are reflected in the editor itself, showing you which tests failed, along with where and why. TestMatrix automatically marks the lines that caused the failures and provides a convenient stack trace in a tool tip. The hot key Ctrl+R+A allows you to run the last test again from anywhere in the solution so you can make application changes and keep testing until it passes. Want to run everything? The hot key Ctrl+R+S executes all tests in the solution.

Automatic code coverage analysis

When it comes to unit testing, your goal should be 100% coverage, and TestMatrix can help you get there. The TestMatrix code coverage analysis feature automatically tracks every line executed during the course of testing. Any missed lines are indicated in the editor, and a full set of coverage reports lets you see where more testing is needed. For more details, read about the TestMatrix code coverage features.

Automatic code profiling

TestMatrix automatically collects line level performance metrics such as call and object creation counts, memory utilization, and execution time as you test your application. There's no external programs to run, no special compilation steps, and no instrumentation to add to your code — everything is automatic. As with code coverage, feedback appears directly in the Visual Studio's editor. The worst performing lines of code are flagged for your review, and each line's performance metrics are instantly visible through tooltips. For more details, read about the TestMatrix code profiling features.

Intelligent test output that's easy to follow

Test results are indicated in the Test Explorer, Test Results window, and Visual Studio Error List, as well as in the editor window. Tests are grouped by status in the Test Results and Test Explorer windows allowing you to view just those tests that have failed so you can concentrate on fixing them. You can click to navigate directly to errors, and by right clicking on a failed test you can jump to the root cause of the failure. You can make the necessary corrections, then quickly rerun just the failing tests. Failed tests remain on the list until they pass. Keeping the list in front of you at all times is an excellent way to practice test driven development. Write your tests, then code until they pass.

Easily debug your unit tests

When a unit test does find something wrong it's easy to debug your code with TestMatrix. To debug from a unit test in the editor, place your cursor over the test marker and use the context menu or hit the hot key Ctrl+R+D. The selected test will be run in the Visual Studio debugger, allowing you to step through the test and the code it is calling, stopping at any breakpoints you have set. You can even debug multiple tests simultaneously by choosing the Debug test option when run running from the Test Explorer or other areas.

Serious speed for serious testing

TestMatrix has been designed to support large projects with extensive collections of unit tests. You can now work with huge bodies of tests faster than ever. Running a individual test cases from the editor is effectively instantaneous. All unit testing is done asynchronously in the background, so Visual Studio still responds while your test cases run. This allows you to keep programming or begin analyzing the results immediately. This focus on speed and tight integration with the Visual Studio enables a level of interactive code/test never before possible. Intelligent build management minimizes the number of projects that must be built before running your tests, to keep things moving.

Export results to XML

You can export the results of a test run in standard NUnit XML format. This makes it easy to generate testing reports, track tests over time, and collect other metrics. From the Test Explorer's file menu, just select Export as XML.

Command line support

You can also run TestMatrix from the command line, allowing you to add unit testing to your automated builds, even across multiple testing frameworks.