[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Collapse]CodeRush Classic
  What's New
 [Expand]System Requirements
 [Expand]Concepts
 [Expand]Visual Elements
 [Collapse]Tool Windows
   Advisor History
   Call Stacks and Exceptions
   Code Issues
   CodeRush Classic
   Decompiler
   Duplicate Code
   Guide
   Open Files
   References
   Spell Checker
   Unit Test Builder
   Unit Test Runner
   Metrics
 [Expand]CodeRush Classic Options
 [Expand]Examples
  Get More Help
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Unit Test Runner

The Unit Test Runner tool window lists unit tests contained in the current solution, facilitates their execution and navigation through tests, and processes test results.

Expanded Tests tree

The main part of the window is filled by the tests tree and the Details panel if it is not hidden. The tests tree lists all tests contained in the current solution.

The tree structure depends on the selected grouping type.

Grouping type Tree structure
By project
By category
By namespace
Flat

It allows you to execute tests contained in a selected test's tree item or run each test separately. Each item of the tree is marked with a status icon. If a tests tree item contains several children with a different status, it will have the highest priority status of its children. For example, a class contains several tests. One of them is failed and the other tests are passed. The class will then have a "Failed" status, because its priority is higher than "Passed" priority.

Status Icon Description Priority
Test is failed 1
Test is passed 2
Test is ignored 3
Test has not been run 4

Expanded Details Panel

The Details panel contains detailed information on the selected test or tests contained in the selected class, namespace or project.

You can navigate to a test directly from Details. Click the desired test reference to move the cursor to the appropriate test. If you click the file reference at the end of a call stack item, CodeRush Classic opens the appropriate file and moves the cursor to the expression that has caused the current test failure.

The Details panel context menu enables you to specify the way the panel displays information on tests.

It includes the following items.

  • Copy

    Copies selection to clipboard.

  • Line view and Tree view

    Specifies the way the CodeRush Classic displays call stack items on the panel.

    Line view Tree view
  • Hide call stack items without file references

    If this option is on, Unit Test Runner shows only call stack items that include file references.

  • Show passed items, Show ignored items, and Show failed items

    Specifies whether passed, ignored, and failed tests are shown on the panel or not.

  • Zoom

    Enables you to increase or decrease the scale of the Details panel contents.

Expanded Console Output and Console Errors panels

The Console Output and Console Errors panels represent Console streams: output and error output.

  • The Console Output panel shows all messages passed to the Console.Write or Console.WriteLine methods called during a test execution.

  • The Console Errors panel shows all messages passed to the Console.Errors.Write or Console.Errors.WriteLine methods called during a test execution.

Expanded Unit Test Runner toolbar

The Unit Test Runner toolbar contains several buttons and the Filter text box. This text box enables you to filter the tests by entering a portion of the test method name.

The toolbar buttons are grouped into three sections.

Test execution control buttons

Executes tests and stops their execution.

Button Description
Executes the selected test(s) contained in the selected item.
Executes all tests shown in the tests tree. Tests that are filtered out are not executed if filtering is enabled.
Executes the selected test(s) contained in the selected item in debug mode.
Repeats the last test execution.
Stops testing.
Refreshes the tests tree.

Details position buttons

Specify the Details panel position.

Button Description
Hides the Details panel
Places the Details panel to the right of a tests tree.
Places the Details panel at the bottom of a tests tree.

Tests filter buttons

Enable or disable tests filtering by status.

Button Description
Filters out all tests, except failed.
Filters out all tests, except ignored.

Tests grouping

The Grouping button opens the menu that enables you to specify tests grouping type. The button appearance depends on the currently selected value:

  • - by project
  • - by category
  • - by namespace
  • - flat

Expanded Unit Test Runner context menu

If you right click a tests tree item, the Unit Test Runner context menu will appear. This menu enables you to access the selected test code, and expand or collapse all nodes with a single click. It also contains the Run, Run All and Debug buttons, even those situated on the toolbar.

Item Description
Run Executes the selected test(s) contained in the selected item.
Run All Executes all tests shown in the tests tree. The filtered out tests are not executed, if filtering is enabled.
Debug Executes the selected test(s) contained in the selected item in debug mode.
Go to Test Opens the selected test code.
Expand All Children Expands all tests tree nodes.
Collapse All Nodes Collapses all tests tree nodes.

Is this topic helpful?​​​​​​​