Home > Overview, Testing > CodeRush Unit Testing Service overview

CodeRush Unit Testing Service overview

July 19th, 2011

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

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

UI

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.

Shortcuts

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.

Extensibility

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.

Resources

Here’s a link to the video made by one of the CodeRush inspired users (TheThoughtfulCoder.com) about the Unit Test Runner.

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:

  1. CodeRush Unit Testing Service overview (current post)
  2. Unit testing inside the code editor and the Solution Explorer
  3. Managing tests with the Unit Test Runner tool window
  4. Shortcuts and actions for running and debugging unit tests
  5. Unit testing service configuration and options
  6. Code templates for generating unit testing code
  7. MSpec testing framework support in the Unit Testing Service
  8. Silverlight testing framework support in the Unit Testing Service
  9. Support for XUnit, NUnit, MBUnit, and Visual Studio testing frameworks
  10. Unit Testing Service extensibility and programmatic management
—–
Products: CodeRush Pro
Versions: 12.1 and up
VS IDEs: any
Updated: Oct/29/2012
ID: C114

Similar Posts:

  1. No comments yet. Be the first and leave a comment!