CodeRush Unit Testing Service overview
The Unit Testing Technology shipped in CodeRush Pro allows you to manage, navigate, run, and debug unit test cases of different unit testing frameworks. The technology consists of several parts:
- Different unit testing frameworks support
- Code editor UI and test runner tool window
- Shortcuts and code templates for creating, running and debugging tests
- Programmatic extensibility and support for managing testing frameworks
Full native support for all popular unit testing frameworks is included out of the box. The supported testing frameworks are:
- VSTest – a Visual Studio integrated unit testing framework
- NUnit – a unit-testing framework for all .Net languages
- MBUnit – a generative unit test framework
- xUnit – a unit testing tool for the .NET Framework
- MSpec – a Context/Specification framework geared towards removing language noise and simplifying tests
- MS Silverlight – a simple, extensible unit testing framework for Silverlight developers
If the solution contains test cases and the appropriate testing framework assemblies are referenced, the Unit Testing Service recognizes them and marks with a test icon inside the code editor that allows you to choose test actions by clicking one. The other way to run tests is to right-click an item inside the Solution Explorer. This will run all test cases inside the scope depending on the item clicked: inside a source file, inside a project, or inside an entire solution. The Visual Studio Output window will have information about operations with test cases. The Unit Test Runner tool window collects all test cases of an entire solution into a single window.
Several keyboard shortcuts dedicated for unit testing, enable you to manage test cases with a single keystroke inside the code editor. This will run or debug test cases inside the scope depending on the current context, or repeat the last performed tests.
CodeRush code templates for different testing frameworks allow you to generate test fixtures, test methods, assertions, testing attributes with a few keystrokes. See the NUnit testing code templates, for example.
Programmatic extensibility allows you to add support for additional testing frameworks that do not exist in the current implementation. Also you can programmatically manipulate any test cases from the DXCore plug-in.
This post is a part of a series of posts about the CodeRush Unit Testing Technology. To learn more about unit testing using CodeRush, please refer to the appropriate topics:
- CodeRush Unit Testing Service overview (current post)
- Unit testing inside the code editor and the Solution Explorer
- Managing tests with the Unit Test Runner tool window
- Shortcuts and actions for running and debugging unit tests
- Unit testing service configuration and options
- Code templates for generating unit testing code
- MSpec testing framework support in the Unit Testing Service
- Silverlight testing framework support in the Unit Testing Service
- Support for XUnit, NUnit, MBUnit, and Visual Studio testing frameworks
- Unit Testing Service extensibility and programmatic management