dotCover Web Help

Sometimes, you do not need to know code coverage data solution-wide. For example, you may not be interested in coverage statistics for code marked with ObsoleteAttribute or a specific legacy project. In this case, you can set coverage filters based on namespace, project, type, type member, or attribute.

There are two scopes for coverage filters:

  • All Solutions - global filters that apply to all solutions in your computer.
  • Current Solution - per-solution filters that apply to the current solution. You can share these filters with your team; see Sharing Coverage Filters for details.
When you open the Coverage Filters dialog, you can see filters in both scopes. If no solution is opened, the dialog shows only global filters. You can change scopes of filters and otherwise modify the set of filters; see Adjusting Coverage Filters for details.

After you calculate code coverage, the filtered items are not included in the coverage snapshot and not shown in the Coverage Results Browser or in the Coverage area of the Unit Test Sessions window .


If some combination of filters excludes everything from the snapshot, this snapshot appears empty.

By default, dotCover provides a global filter for excluding code items by the ExcludeFromCodeCoverageAttribute attribute. The filter is disabled by default. If necessary, you can enable, modify or remove it.


Coverage filters are saved in the dotCover settings. If you reset all settings, all coverage filters will be removed. For more information about dotCover settings, see Managing and Sharing Options.

Besides setting up coverage filters, dotCover provides the following ways of filtering and searching coverage results;