dotCover 2017.2 Help

Working with Test Categories

NUnit and MSTest frameworks allow grouping tests and test classes into suites with the Category (NUnit) or TestCategory (MSTest) attribute on the corresponding symbols. dotCover is aware of these attributes and provides a number of related features.

Browsing Test Categories

In the Unit Test Explorer window, you can explore all existing categories in the current solution. To do so, in the Group by selector, choose Categories or Project and Categories. It is also possible to explore categories within a session in the Unit Test Sessions window. You can find the same grouping preferences under the Options selector.

Executing all tests in a category

From each test/test class belonging to some category, you can start execution of all tests in this category. To do so, click on the action indicator, choose Run/Debug or Run All/Debug All or Cover/Cover ALl in the action list, and then click small arrow on the right and click on the category name or press Enter:


Another option to run all tests in a category is to group tests by category in the Unit Test Explorer window, choose the category node, and then click Run Unit Tests /help/img/dotnet/2017.2/ThemedIcon.RunTest.Screen.[Gray].png / Debug Unit Tests /help/img/dotnet/2017.2/ThemedIcon.Debug.Screen.[Gray].png or Cover Unit Tests /help/img/dotnet/2017.2/ThemedIcon.JetBrainsDotCoverPresentationVsResourcesUnitTestingCoverageCover.Screen.[Gray].png on the toolbar or use the corresponding shortcuts (Ctrl+T R / Ctrl+T D or Ctrl+T H ).

Ignoring categories

If necessary, you can add one or more categories to the ignore list. All tests belonging to these categories will be skipped during the execution of a unit test session. Note that you can still run specific tests from ignored categories individually.

To add a category to the ignore list, type the category name into the Skip tests from categories field on the ReSharper | Options | Tools | Unit Testing page of dotCover options. If you enter multiple categories, use comma as the delimiter.

Last modified: 29 August 2017