StudioTools: Unit Testing
StudioTools unit testing features are built upon the NUnit framework. NUnit is a straight forward, practical, and easy to learn library for building automated unit tests. It's power and ease of use is probably why NUnit has been so widely adopted throughout the development community, making it the de-facto standard for automated unit testing in .NET. If you're new to unit testing, then StudioTools will point you in the right direction.
100% compatible with your existing tests
StudioTools' unit testing features are 100% NUnit compatible. All testing features are built directly from a stock NUnit which has been extended to work within the Visual Studio environment. Because this integration works without replacing NUnit 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. StudioTools 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.
Solution, project, and file level testing
If you live in Solution Explorer, you'll quickly appreciate StudioTools tight integration with Visual Studio. StudioTools automatically discovers which classes and files contain unit tests. You can run all tests in a solution, project, folder, or single source file with a right click in the Solution Explorer.
Run unit tests as easily as compiling
With StudioTools, running your solution's unit tests is as easy as making a build. You can start your tests from the StudioTools menu, via hot key, or interactively through the Test Explorer. StudioTools will even build your projects before running your tests if they necessary. That means you can run your unit tests as part of your compilation and get instant results. StudioTools make it easy to continuously test your code every step of the way.
View and run all your tests from one easy interface
Everyone has their own style of organizing their unit tests. Unit tests can be bundled into their own project DLL, managed by separate namespaces, or coded directly into your application classes. Which ever combinations you choose, StudioTools will help you work with them more efficiently.
StudioTools includes a Test Explorer panel which automatically discovers all of the tests in your solution, and organizes them by project, namespace, and category into a familiar explorer interface. You can use the Test Explorer to browse and navigate through of the unit tests in your solution. To edit or review a test case, simply click on its icon in the Test Explorer.
Pick and choose the tests you want to run
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. A convenient category filter allows you to hide or show entire categories of unit tests, making it easy to skip long running tests or focus on a particular segment of your application.
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. StudioTools 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 rerun the last test from anywhere in the solution so you can make application changes and keep testing until it passes.
Track failing tests
Failing unit tests are indicated in the Test Explorer and highlighted in the editor window. A separate tab of the Test Explorer lets you 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 things go wrong it's easy to debug your unit tests with StudioTools. To debug a unit test from the editor, place your cursor over the test and use the context menu or the hot key Ctrl+R+D. The selected test will be run in the Visual Studio debugger, allowing you to step through your tests, which will stop at any breakpoints you have set. You can debug multiple tests by choosing the option when run running from the Test Explorer or other areas.
Serious speed for serious testing
StudioTools 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. For example, a solution with over 1400 tests all the tests and begins running them in just 5 seconds.
Launching tests in smaller projects is effectively instantaneous, taking less time to start the tests than to compile. All unit testing is done asynchronous 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. Running individual test cases happens so fast, you won't even notice. This focus on speed and tight integration with the Visual Studio enables a level of interactive code/test never before possible.
Intelligent test output that's easy to follow
StudioTools displays Trace and Console output, along with test result messages, timings, and stack traces to both the Visual Studio output window and its own Test Results panel. You can click on any stack trace lines or test failure messages in the output window to navigate directly to the source of the problem.
Analyze your test performance
After each test run you the test results window allows you to review the time required to run each tests. Sortable columns make it easy to pick out under performing tests. For more detail, run your unit tests with the profiling feature to track memory usage, object allocation, and execution timings at the class, method, or line level. For more details, check out the StudioTools performance profiling features.
Track your testing progress
When it comes to unit testing, your goal should be 100% coverage, and StudioTools can help you get there. StudioTools' code coverage analysis features are fully integrated with the Test Explorer and the other unit testing features. When you run your tests with the profiling option your test coverage is automatically tracked and reported. 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 StudioTools' code coverage features.
Fully configurable color schemes
If you would prefer a different color scheme, you can choose your own colors from the StudioTools section of the Visual Studio options panel. This is especially helpful if you suffer from red/green color blindness!
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 .