NCover Documentation

Clear Coverage Filters

Clear the existing filters on the view. This is processed before the XmlFilters flag.

Usage:
//ccf 

Coverage Filters

Filters can either exclude elements from coverage metrics and reporting, or include elements into coverage metrics and reporting (excluding all elements that are not included). All include filters are applied before any exclude filters, but once all filters are applied, excluded items are not considered when applying other options.
NOTE: filtered items still exist in saved coverage data MergedCoverageDataFileName and reports. If you want excluded elements to be stripped from reports, use the //rdf flag ReportDataFilter.

Usage:

//cf filterdata[:item type][:isRegex][:isInclude]

'filterdata' is the pattern the filter uses to match elements

'item type' is the type of element the filter matches
Possible Values: Assembly, Namespace, Class, Method, Document

'isRegex' when true the 'filterdata' is interpreted as a regular expression, when false it is interpreted as a wildcard (default is false)

Note: In a coverage filter, "YourModule\*" will be interpreted as a wildcard, by default. If you don't get the results you expect, try the syntax below:

<p>
//cf "YourModule*":Assembly </p>

<p>
You might also want to try as a regex: </p>

<p>
//cf "YourModule\*":Assembly:True </p>

<p>
Or </p>

<p>
//cf "YourModule*":Assembly:True</p>

<p>
    'isInclude' when true elements that don't match the filter are excluded, and when false, elements that match the filter are excluded (default is false) </p>

Rebase Source File Paths

When searching for source files, treat source files paths that begin with [from path] as if they began with [to path]. If multiple rebased paths are given, they are applied in the order in which they appear on the command line.

Usage:

//rebasedPath [from path] [to path]

'from path' is the absolute path to the file(s) as it was on the build machine.

'to path' is the absolute path to the same file(s) as it is on the local machine.

Minimum Coverage Thresholds

Complete Edition Feature

Minimum coverage thresholds fail the build if the merged coverage data does not satisfy them. Thresholds can be set for any of the supported coverage types, for any particular value, from 0% to 100% (or any value >= 0 for the CyclomaticComplexity metric). Thresholds can apply to the overall coverage percentage, or to assemblies, namespaces, or classes.

Usage:
//mc Coverage Metric[:Min Coverage Value][:Item Type][:Pattern]

'Coverage Metric' specifies the metric this threshold applies to.
Allowed values: SymbolCoverage, BranchCoverage, MethodCoverage, and CyclomaticComplexity

'Min Coverage Value' specifies the minimum value the given coverage metric is allowed to have. If the coverage value for the given metric is below this value, the build will fail.
Allowed values: 0 - 100% for everything but CyclomaticComplexity. CyclomaticComplexity must be > 0.

'Item Type' restricts the threshold to items of the given type
Allowed Values: View, Module, Namespace, Class
Default Value: 'View' (the overall coverage of the entire merged coverage data).

'Pattern' restricts the threshold to items of the given type whose name matches the value in this field The value can be a regular expression, or it can be a specific name. The value matches the fully-qualified name of the item, i.e. match a class by entering 'System.IO.Path' (case-insensitive match).

Use Minimum Coverage

When set, NCover.Reporting will copy the FailBuildThresholds into the SatisfactoryThresholds, merging the two together to create SatisfactoryThresholds

Usage:
//mcsc

Xml Report Filter

Works with the ReportType parameter of the XmlReports argument to strip unnecessary data from the xml reports. By default, the unnecessary data is retained in the report and ignored, but for large projects the unnecessary data makes the xml reports render slowly on some build systems.

Usage:
//rdf "Assembly | Namespace"

Report Invalid Files

By default, when preparing coverage data for reporting, NCover Reporting will not create any reports if any of the coverage files are invalid coverage files. Using this argument tells NCover Reporting to report any invalid coverage files and create reports from the data in the valid coverage files (if any).

Usage:
//rif 

Satisfactory Coverage Thresholds

Complete Edition Feature

Satisfactory coverage thresholds report the items in the merged coverage data that do not satisfy them. Thresholds can be set for any of the supported coverage types, for any particular value, from 0% to 100% (or any value >= 0 for the CyclomaticComplexity metric). Thresholds can apply to the overall coverage percentage, or to assemblies, namespaces, or classes.

Usage:
//sct Coverage Metric[:Min Coverage Value][:Item Type][:Pattern]

'Coverage Metric' specifies the metric this threshold applies to.
Allowed values: SymbolCoverage, BranchCoverage, MethodCoverage, and CyclomaticComplexity

'Min Coverage Value' specifies the minimum value the given coverage metric is allowed to have. If the coverage value for the given metric is below this value, the item will be reported.
Allowed values: 0 - 100% for everything but CyclomaticComplexity. CyclomaticComplexity must be greater than 0.

'Item Type' restricts the threshold to items of the given type
Allowed Values: View, Assembly, Namespace, Class
Default Value: 'View' (the overall coverage of the entire merged coverage data).

'Pattern' restricts the threshold to items of the given type whose name matches the value in this field The value can be a regular expression, or it can be a specific name. The value matches the fully-qualified name of the item, i.e. match a class by entering 'System.IO.Path' (case-insensitive match).

Max Failed to Report

By default, NCover.Reporting will only show the first 50 items that fail the minimum coverage thresholds. Set this value to change how many items NCover.Reporting will list in detail (the total number that failed is always reported).

Usage:
//smf 500

If you still need technical assistance, we can help:

Submit A Support Ticket