NCover Documentation

When creating reports with NCover Reporting, some reports require special parameters to run. This reference explains what parameters are, gives examples of how to use them, and serves as an exhaustive reference of available parameters and the reports those parameters are used with.

Explaining Parameters

Parameters are sets of name-value pairs that are used with NCover Reporting for creating certain reports, and are supported in the command line, MSBuild configuration, NAnt configuration, and NCover configuration. For examples of how to use parameters in the command line and in configuration files, see Parameters Examples. Valid param names and acceptable values for those names are defined separately by each report. See Supported Parameters and Reports for an exhaustive reference of valid parameters and the reports that use them. Param names are not case sensitive.

Parameters Examples

The following examples show how to use parameters in the command line and your configuration files.

Using parameters in the command line

//or ... params (name=value, name=value)

(To learn how to use the //or flag, go here).

Using Parameters with MSBuild, NAnt, and NCover configuration files

See the MSBuild, NAnt, or NCover Configuration pages for examples of using parameters with these types of configuration files.

Supported Parameters and Reports

NCover offers three reports that use parameters. Reports can have both required and optional parameters.

The Trends Report

The Trends Report shows the trend of a coverage file and its trends. Choose the TrendCoverageMetric value of your choice to create the trend line.

Required parameters

Name Acceptable Values
TrendCoverageMetric SymbolCoverage, BranchCoverage, MethodCoverage, LineCoverage, CyclomaticComplexity
Level Assembly, Namespace, Class, Method

The Diff Report

The Diff Report shows the coverage percentage difference between the current coverage file and the last item in the trend file. Choose one or multiple TrendCoverageMetric values to use to create the difference analysis.

Required parameters

Name Acceptable Values
TrendCoverageMetric SymbolCoverage, BranchCoverage, MethodCoverage, LineCoverage, CyclomaticComplexity
Level Assembly, Namespace, Class, Method

Optional parameters

Name Acceptable Values
diffatleast Acceptable values are percentages between -100.00 and 100.00. (Do not include a percentage sign in the value.) Setting this value will cause the report to only display items where coverage has changed by the percentage specified.

The SymbolCCByGroup Report

The SymbolCCByGroup Report groups classes by their max cyclomatic complexity.

Optional parameters

Name Acceptable Values
Groups A semicolon-delimited list of numerical group boundaries. See the example and explanation below.

SymbolCCByGroup Example

//or SymbolCCByGroup:Html params (Groups=5;15;31)

The group boundaries define the groups that the classes will be placed in. The example above separates individual classes into groups based on their cyclomatic complexity. The groups defined by the above example would be 0-4, 5-14, 15-30, and 31+, so classes with a cyclomatic complexity of 0-4 would be in the first group, 5-14 in the second group, and so on.

If you still need technical assistance, we can help:

Submit A Support Ticket

Try NCover Free Contact Us Online