dotCover 10.0 Help

Unit Test Sessions window

ReSharper | Windows | Unit Test Sessions
ReSharper | Unit Tests | Unit Test Sessions

dotCover runs unit tests in the Unit Test Sessions window. The window appears automatically when you run tests from the current document or from the project or solution. For more information, see Using Unit Test Sessions.

Unit Test Sessions window

The window is designed to help you run any number of unit test sessions, simultaneously and independently of each other. Sessions can be composed of any combination of tests. In the debugging mode, only one session can be run at a time.

The unit test tree shows the structure of tests belonging to a session, which you can filter to show only passed, failed or ignored unit tests. You can navigate to the code of any unit test by double-clicking it.

Status bar and progress bar

The progress bar and the status bar under the toolbar display the current progress. On the status bar, you can see the total number of tests in the session as well as number of tests in different states. By default, tests in all states are shown, but you can change it by clicking on the corresponding icons.

uts_toolbar_show_all_tests Show All Tests Show successful, failed, and ignored tests.
unit_test_status_passed Show Only Passed Tests Only show successful tests and hide all other tests.
uts_toolbar_show_only_failed_tests Show Only Failed Tests Only show failed tests and hide all other tests.
uts_toolbar_show_only_ignored_tests Show Only Ignored Tests Only show ignored tests and hide all other tests. A test is ignored if it has the corresponding attribute, or if the whole category where it belongs is ignored.
unit_test_status_unknown Show Only Unknown Tests Only show dirty tests.

Window tabs

When you open new unit test sessions in the window, they are displayed in new tabs, which show up on the left. The previously open tabs move to the right if the with of the window allows, otherwise they unload themselves saving memory - but you can always restore them by clicking the arrow that appears to the right of the tabs and choosing the desired tab:

Tool window tabs

To prevent a tab from unloading, click the pin icon pin_window next to the tab title.

Toolbar controls

uts_toolbar_rerun Repeat Previous Run Ctrl+T,T Repeats the previous test run.
uts_toolbar_run_all_tests Run All Tests

Runs all tests in the current session.

icon_profile_all Profile All Tests By clicking this button, you can profile all tests. This button appears if JetBrains dotTrace is integrated with Visual Studio.
icon_cover_all Cover All Tests Ctrl+T,I By clicking this button, you can run coverage analysis for all unit tests in the test session.
toolbar__run_selected_tests Run Unit Tests Ctrl+T,R Runs selected tests. To select multiple texts, use the Ctrl key.
uts_toolbar_debug_selected_tests Debug Unit Tests Ctrl+T,D Debugs selected tests in the current session.
uts_toolbar_profile Profile Unit Tests This button appears if JetBrains dotTrace is integrated with Visual Studio. By clicking this button, you can profile selected tests.
uts_toolbar_cover Cover Unit Tests Ctrl+T,H By clicking this button, you can perform code coverage on the selected tests.
uts_toolbar_stop_execution Stop Execution Stops the current test session.
uts_toolbar_track_running_test Track Running Test Specifies whether dotCover should select test entries when the corresponding tests are executed.
icon_auto_scroll_output Auto Scroll Output When Running Test This button enables the output pane to scroll when the test is running so that the end of the output is always visible.
toolbar__remove Remove Selected Tests Delete Removes selected tests from the current session.
toolbar__expand_all toolbar__collapse_all Expand All/ Collapse All Expands/collapses all nodes in the current tab.
toolbar__previous toolbar__next Previous/ Next Shift+F8/F8 Navigate to the previous/next item and scrolls through the source code accordingly.
toolbar_show_preview Show Output Ctrl+P

This selector allows you to open the Output and the Coverage panes and place them to the bottom or to the right of the window.

The Output pane lets you analyze test results and navigate from a failed test's output to the code lines that originated the assertion or exception, all with a single click.

The Coverage pane displays the code coverage tree or the hot spots view and provides the same controls and functions as Coverage Results Browser Window, plus the Show coverage for selected tests icon_show_coverage_for_selected_test button that allows viewing total coverage of particular unit test item.

toolbar__export Export Click this button to export the data currently displayed in the window in text format, or use the drop-down selector to export the data in XML or HTML format. The Export Data dialog box that appears, will help you to save the data to a file or copy it to the clipboard.

You can configure this set of preferences individually for each test session.

  • uts_toolbar_build_settings Build Settings - Specifies whether building is required before executing tests. Provides several options:
    • Automatic (selected by default) - Before executing tests, dotCover will rebuild all projects that are related to the current test session and that have changes since the last execution.
    • Automatic (whole solution) - Before executing tests, dotCover will rebuild all projects in your solution that have changes since the last execution.
    • Always Build - Before executing tests, dotCover will rebuild all projects that are related to the current test session.
    • Never Build - dotCover will not build anything before executing tests. If you choose this option, you will have to make sure that all related projects are built.
  • uts_toolbar_lock_session Lock Session - Locks the current test session to prevent automatically adding new tests to this session.
  • toolbar__time Show Time - Allows you to show or hide execution time for each item in the test session.
  • Platform - Lets you explicitly specify platform architecture of the test runner or choose Auto to use platform architecture corresponding to the project settings.
  • Framework - Lets you explicitly specify the .NET framework (CLR) version of the test runner or choose Auto to use the .NET framework 4.0.
  • Group by - Allows grouping items in the window by different categories.
icon_reference_dm_unit Reference dotMemory Unit Framework Installs the dotMemory Unit Testing Framework NuGet package and references it in your unit test project.

This button appears if JetBrains dotMemory is integrated with Visual Studio.

See Also

Last modified: 10 November 2015