NCover Documentation

Coverage Data Files

A list of coverage files -or- wildcards that resolve to coverage files. Uses the NAnt 'Fileset', so "**" globs are supported.The specified coverage files will be merged together before any other options are applied.

<ncoverreporting>
    <coverageDataPaths>
        <include name="coverage.xml"></include>
        <include name="coverage*.02.09.xml"></include>
    </coverageDataPaths>
</ncoverreporting>

Append Trend to a File

Appends trend data from the merged coverage files to the specified output path and filename.

The file will be created if it does not exist. If this parameter is specified and LoadTrendPath is not, then this file will provide trend data for the reports.

Otherwise, the file specified by LoadTrendPath will provide trend data for the reports.

If both CoverageTrendPath and LoadTrendPath are specified, then the trend data from the merged coverage files will be appended to the path in CoverageTrendPath before the trend data for the reports is loaded from LoadTrendPath. If CoverageTrendPath and LoadTrendPath are the same full path and filename, then LoadTrendPath.

Usage

coverageTrendPath="C:\data\trends\myproject.trend"

Build Id

Specify the build ID for the MergedCoverageDataFileName. Defaults to the build ID of the first coverage data file loaded.

Usage

buildId="myproject_3.0.12.3721"

Hide

Specify what elements to hide (if any) in the report.

These elements will still exist and affect coverage percentages, but they will not appear.

Possible Values:

  • None (default)
  • HideUnvisited
  • HideFullyCovered
  • HideThresholdCovered

Usage

hide="HideUnvisited"

Ignore Failed Builds

By default, reports with trend data will include trend data from builds that had failing tests. However, you can make the reports act as if that data doesn't exist by using this argument or setting it to true.

Using this argument will make the reports only use trend data from builds that had no failing tests.

Usage

ignoreFailedBuilds="true"

Load Trend from a File

Rather than creating new trends from the coverage data, this parameter loads trend data for the report from the specified output path and filename, and uses the trend data in the given file without appending trend data from the merged coverage files.

Usage

loadTrendPath="C:\data\trends\myproject.trend"

Output Path

Specify the default output path for all generated reports. Defaults to the current directory.

NOTE: this parameter is interpreted as a directory for the 'FullCoverageReport' and as a file for every other report.

Usage

outputPath="D:\reports\html\fullcoverage10.2.09"

Output Report

The Reports option allows you to create multiple reports using the same filters, satisfactory thresholds, and sort order, giving you multiple views of the same data.

Usage:
<ncoverreporting>
<Reports>
    <Report>
        <ReportType> ... </ReportType>
        <Format> ... </Format>
        <OutputPath> ... </OutputPath>
        <params>
            <param>
                <name> ... </name>
                <value> ... </value>
            </param>
            <param>
                <name> ... </name>
                <value> ... </value>
            </param>
        </params>
    </Report>
</Reports>
</ncoverreporting>

'ReportType' is the type of report to create.
For a list of possible values, see the Report Types Reference.

'Format' specifies the file type (XML or HTML) to ouput the report file(s) in.
Possible Values are "Xml" or "Html".

'OutputPath' is where the report will be created.
If no output path is specified, then the value of OutputPath will be used.

'params' is a list of optional name-value pairs that is specific to the report type being created.
For an exhaustive explanation of parameters, examples, a reference of the Report Types that support parameters, and the parameters they support, go to the NCover Reporting Parameters Reference.

Project Name

Set this value to control the project name that appears at the top of every generated report.

By default, the project name is taken from the first coverage file loaded.

Usage

projectName="my very long project name"

Sort By

Specifies the sorting to apply to the reports. Default is no sorting.

Permitted values:

  • Name
  • ClassLine
  • CoveragePercentageAscending
  • CoveragePercentageDescending
  • UnvisitedSequencePointsAscending
  • UnvisitedSequencePointsDescending
  • VisitCountAscending
  • VisitCountDescendin
  • FunctionCoverageAscending
  • FunctionCoverageDescending

Usage

sortBy="VisitCountDescending"

Top Uncovered to Report

By default, NCover.Reporting only reports the top 10 most uncovered items in the "Top Uncovered" reports. Set this value to control how many are shown.

Usage

maxTopUncoveredToReport="50"

Xslt Override Path

You may provide the path to the Xslt file you wish to use for the report.

Usage

xsltOverridePath="mycustomfile.xslt"

If you still need technical assistance, we can help:

Submit A Support Ticket