Filtering is available for every data view of NCover below the Home page and is applied by creating Filter Rules.
In version 5.1 and above, filters created for browsing documents are also applicable when browsing code by namespace and class. In addition, class and namespace filters now apply to document browsing.
- At any level below Home, click on the left-hand pane of the GUI.
- Create a Name and a Description (optional).
Like the Pre-Coverage filters, post-coverage filters have four configurable parameters:
- Include or Exclude
- Type - Module, Namespace, Class, Method, Attribute, Document Path, Method Branch Coverage, Method Sequence Point Coverage, Method Complexity Percentage and Method CRAP Score.
- Condition - Matches, Starts With, Ends With, Contains, and Regex.
Tip: When using 'Starts with' and 'Namespace', the full name of the namespace is required.
Likewise, the Class name displayed in the NCover GUI is abbreviated for ease of navigation, but when creating a filter using 'Starts with' and 'Class', the full name of the class is required.
For these reasons, the 'Contains' Condition generally gives the expected results with both namespace and class filters.
After your filter is saved, a notification will appear in the GUI to remind you that the coverage data you're viewing is being filtered.
The filter notification also allows you to easily remove the post-coverage filter by clicking on it.