Home > Testing, Tool Windows > Managing tests with the Unit Test Runner tool window

Managing tests with the Unit Test Runner tool window

October 29th, 2012

The Unit Test Runner tool window is designed to review, navigate, execute, and manage unit test cases of the entire solution. Here is what it looks like:

CodeRush Unit Test Runner Tool Window

The window contains the following parts:

  • A toolbar to execute test operations and change window properties;
  • A filter box to find required test cases;
  • A solution tests tree;
  • Details of tests run;
  • A status bar with a quick status info.

Toolbar

The toolbar has the following options:

Icon

Button

Description

  Run Runs a single test or several tests from the selected node in the tests tree.
  Run all Runs all test cases in the current solution.
  Debug Debugs a single test or several tests from the selected node in the tests tree.
  Repeat last test(s) Runs test cases that were previously executed or debugged.
  Stop Stops the current test run process, if any.
  Refresh tests tree Performs a tests search operation to find new tests or remove the deleted ones.
  Hide test run details Hides the details tabs of the test runs.
  Show test run details on right Sets the landscape layout for the tests tree and details of a test run.
  Show test run details below Sets the portrait layout for the tests tree and details of a test run.
  Show failed only Filters the tests tree to show only failed tests.
  Show ignored only Filters the tests tree to show only ignored tests.
  Grouping Groups the tests tree by Project, Category, Namespace, or without grouping (flat view).

Filter and Tests Tree

The filter text box allows you to find the tests by name.

The tests tree contains two columns:

  • Tests. Shows test cases with a parent project, namespace and class nodes.
  • Duration. Shows the duration of each run test run.

The tree has a right-click context menu with the following options:

CodeRush Unit Test Runner Tree Context Menu

  • Go to class (test): navigates to the corresponding item selected in the tests tree.
  • Expand All: expands all nodes of the tests tree.
  • Collapse All: collapses all nodes of the tests tree.

Test Run Details and Status Bar

The details tab of the test run displays a syntax-highlighted call stacks which makes it easier to see what led to a failure:

CodeRush Unit Test Runner Details Tab

You can click the file name to open and navigate to the file with a failed test. All colors in this tab are customizable on the Test Runner  Window option page in the Options Dialog. Additional options for this tab are available in the right-click context menu:

CodeRush Unit Test Runner Details Tab Context Menu

Available options are:

Icon

Menu item

Description

 –

Copy Copies the information from the Details tab into Clipboard.
  Line View Switches the call stack view to the line view.
  Tree View Switches the call stack view to the tree view.
  Hide call stack items without file references Toggles the visibility of call stack rows depending on the file names presence to filter the call stack and make it easier to read.
  Show passed items Toggles the visibility of the passed tests.
  Show ignored items Toggles the visibility of the ignored tests.
  Show failed items Toggles the visibility of the failed tests.

 –

Zoom -> Allows you to select the zoom level of the details information.

The Console output and Console Errors tabs shows the standard output and errors of the Console correspondingly, if any.

The status bar shows a summary of total tests, passed, failed, ignored tests.

Don’t forget that you can execute the unit test operations directly from the code editor or via the dedicated unit testing shortcuts.

—–
Products: CodeRush Pro
Versions: 12.1 and up
VS IDEs: 2008 and up
Updated: Oct/29/2012
ID: C214

Similar Posts: