dotCover 2020.1 Help

Unit Test Coverage

In Visual Studio:
ReSharper | Windows | Unit Test Coverage
Control+Alt+K B

This window allows exploring coverage data obtained during unit tests coverage run.

Each snapshot can be presented in two views, which you can toggle with the buttons in the right of the toolbar:

Coverage Tree

In this view, all code items are grouped in a tree structure and you can study the coverage of each code item.

Coverage Tree view in the Unit Test Coverage window

In the Coverage column, dotCover uses three colors to display the coverage status:

  • Green— the percentage of covered statements within the node.

  • Red— the percentage of uncovered statements within the node.

  • Grey— the nodes not covered during the test run as they do not have executable code statements.

Hot Spots

In this view, you can quickly see the potential risk areas within the snapshot. To learn more, see Detecting Hot Spots.

Hot Spots view in the Unit Test Coverage window

Toolbar Controls

ThemedIcon StatusAll Screen Gray pngAll Tests Show all tests in the current test session.
ThemedIcon Success Screen Gray pngPassed Tests Only show successful tests and hide all other tests.
ThemedIcon StatusFailedPassive Screen Gray pngFailed Tests Only show failed tests and hide all other tests.
ThemedIcon Ignore Screen Gray pngIgnored 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.
ThemedIcon JetBrainsDotCoverInteractivePresentationResourcesCoverageTreeToolBarCoverageTree Screen Gray pngCoverage Tree Toggles the Coverage Tree view.
dotCover hot spots icon pngHot Spots Toggles the Hot Spots view. For more information, see Detecting Hot Spots.
All Tests If selected, the tree shows aggregated coverage results from all unit test sessions.
All Tests in Active Session If selected, the tree shows coverage results for all unit tests from the session that is currently selected in the Unit Test Sessions window.
Selected Tests in Active Session If selected, the tree shows coverage results for the test selected in the current session in the Unit Test Sessions window.
ThemedIcon JetBrainsDotCoverVsPresentationResourcesSolutionBasedCoverageTreeMatch Screen Gray pngMatch coverage results with current project structure If this button is turned on, dotCover displays only assemblies that are included in the current solution. For more information, see Match Coverage Snapshot with Project Structure.
Highlight codeHighlight code

Toggles highlighting of the code in the editor for the current coverage snapshot. For more information, see Visualize Code Coverage.

Flatten NamespacesFlatten Namespaces

Toggles between flat and tree namespace representation. In the flat mode, all namespaces including child namespaces are shown in a flat list (on the same level).

ThemedIcon JetBrainsDotCoverInteractivePresentationResourcesSnapshotManagementSave Screen Gray pngSave coverage snapshot as Saves the current snapshot to a .dcvr file. For more information, see Save and Open Coverage Snapshot.
ThemedIcon JetBrainsDotCoverVsPresentationResourcesSnapshotManagementTrash Screen Gray pngDrop coverage results

Removes the existing coverage results.

icon export pngExport coverage reports Allows you to export the test coverage report to one of the selected formats: HTML, XML, JSON, and XML for NDepend. For more information, see Export Coverage Results

The context menu in this window includes commands:

  • Exclude selected nodes

  • Exclude all nodes except selected

  • Exclude selected node and create coverage filter

These commands are rather self-explanatory; they allow excluding nodes from coverage snapshot presentation .

Last modified: 08 May 2020