NCover Documentation

Pre-Coverage Filter

Note: Project settings in Collector are read-only. All project settings are configured in Code Central and synced to Collector.

NCover can include or exclude attributes, assemblies, files, methods, and types at runtime by using regular expressions, as specified in thr Pre-Coverage Filter.

You can cover only the code you care about and shorten collection times by specifying what assemblies Collector should or shouldn't be watching.

Collector will gather coverage on any code loaded when the executable defined in the previous step runs, but you don't always want to collect coverage on everything -- Microsoft Active Accessibility code, for example.

Filter Rules have the following parameters:

Include or Exclude

Type - Module, Namespace, Class, Method, Attribute, Document Path, Branch Coverage, Sequence Point Coverage, Max Complexity Percentage and Max Complexity.

Condition - Matches, Starts With, Ends With, Contains, and Regex.

Value

Using the example of the Microsoft Active Accessibility module we discussed earlier, a filter rule to exclude that code would look like this:

You can also create a filter to include only the code you care about, and ignore everything else, by specifying your assemblies with an include rule:

If you still need technical assistance, we can help:

Submit A Support Ticket