NCover Documentation

Please visit NCover Report for updated information.

The information in this document is provided solely to help third parties with particular requirements create custom reports based on NCover's code coverage data. While we guarantee the accuracy of the information presented, and we will try not to change the format arbitrarily, use this information at your own risk.

A report file can be created using the //or (command line), OutputReport (msbuild task), or reports (nant task) options with NCover.Reporting.

A trend file can be created using the //at (command line), CoverageTrendPath (msbuild task), or coverageTrendPath (nant task) options with NCover.Reporting.

The following information is best used as a reference, or read through while looking at an open trend or report file. An example report is at the bottom of this article.

<class /> - Class

<en> - The unique identifier of the class in the namespace.
<name> - The name of the class
<signature> - The signature of the class if it is generic or otherwise compiler generated

<doc /> - Document node for every source file in the coverage data.

The <doc /> element may exist more than once if the document is defined in more than one assembly. <doc /> elements are unique by om and (case-insensitive) url.

id = The unique document id.
om = The owner module id that the document belongs.
url = The url of the file. This is the location of the file based on the symbols used during the execution.

<en /> - Element name.

This is the fully qualified name in the tree within its parent. It is not unique across an entire execution.

<execution /> - The execution information.

For a trend file, this will exist for every execution contained in the file. For a report file, this will only exist one time.
<failed> - Whether the test runner or the covered program returned a non-zero exit code
<id> - The instance id.
<measuretime> - The end time of the test execution
<projectname> - The name of the project at the time of execution
<starttime> - The start time of the test execution
<satisfactorybranchthreshold> - The satisfactory branch threshold at the time of execution
<satisfactorycoveragethreshold> - The satisfactory coverage threshold at the time of execution
<satisfactorycyclomaticcomplexitythreshold> - The satisfactory cyclomatic complexity threshold at the time of the execution
<satisfactoryfunctionthreshold> - The satisfactory function threshold at the time of execution

<method /> - Method

<en> - The unique identifier of the method in the class.
<name> - The name of the method.
<signature> - The signature of the method.

<mod /> - Module

The module node will exist for every module.

<en> - The Element name - The unique identifier for the module in the file.
<assembly> - The Assembly name without the dll or exe extension.
<assemblyidentity> - The fully qualified assembly identity provided by the assembly meta data
<modid> - The module id. This is used by documents since a document may exist in multiple modules.
<path> - The path to the assembly at the time ncover was executed.

<ns /> - Namespace

Every namespace in the module will exist as a child element of module. Namespaces are not nested in the file.

<en> - The name of the namespace.

<stats /> The stat node is available for any item in the tree and is a rollup of everything below it.

The stats node is located on every element in the entire file. This data provides the rollup of all the data for that node. The only values that need to be calculated at any point in the file are the coverage percentages. Those formulas are provided below.

(E) Complete only
(R) Report format only. It is not available in the trend file

acp = Acceptable Coverage Percentage (R)
abp = Acceptable Branch Point Percentage (E) (R)
afp = Acceptable Function Percentage (R)
acc = Acceptable Cyclomatic Complexity (E) (R)
ccavg = Average Cyclomatic Complexity (R)
ccmax = Maximum Cyclomatic Complexity (R)
ex = Excluded (0 false) (1 true) (R)
ei = Execution Id
ubp = Unvisited Branch Points (E)
ul = Unvisited Lines
um = Unvisited Methods
usp = Unvisited Sequence Points
vbp = Visited Branch Points (E)
vl = Visited Lines
vsp = Visited Sequence Points
mvc = Maximum Visit Count - The maximum number of times a method was visited in the tree
vc = Was a method visited (0 false) (1 true)
vm = Visited Methods
svc = Visited Count Summary - This is the total number of method visits for all items below the current node. (E) (R)
doc = sub nodes available on modules, namespaces, classes and methods. Every document that belongs to the node will be listed as a sub element. (E) (R)

Calculating Coverage on the Stats element

This calculation is valid for any <stat> element in the file. All of the values are rolled up from it's children so there is no need to walk the children to calculate coverage.

 vsp / (usp + vsp) = Coverage

vbp / (ubp + vbp) = Coverage

Method (Function)
vm / (vm + um)= Coverage

Lines and Symbols will be 0 if the pdb files are not available, as they were with the coverage file that you sent.

Example Report File

<trendcoveragedata xmlns:xsi="" xmlns:xsd="">
  <stats acp="95" afp="80" abp="95" acc="20" ccavg="1.61" ccmax="6" ex="0" ei="1" ubp="3" udp="0" ul="19" um="2" usp="19" vbp="98" vdp="0" vl="226" vsp="226" mvc="14" vc="1" vm="54" svc="185" />
  <doc id="2" om="1" url="c:\Temp\Samples\SampleProjects\SampleConsoleApplication\BusinessObjects\Order.cs">
    <stats acp="95" afp="80" abp="95" acc="20" ccavg="1.38" ccmax="2" ex="0" ei="1" cc="1.38;2" ubp="0" udp="0" ul="0" um="0" usp="0" vbp="25" vdp="0" vl="38" vsp="38" mvc="14" vc="1" vm="16" svc="26" />
    <profilerversion> - Debug Build</profilerversion>
    <projectname>NCover 3</projectname>
    <en>BusinessObjects, Version=, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL</en>
    <stats acp="95" afp="80" abp="95" acc="20" ccavg="1.57" ccmax="3" ex="0" ei="1" ubp="0" udp="0" ul="0" um="0" usp="0" vbp="77" vdp="0" vl="96" vsp="96" mvc="14" vc="1" vm="38" svc="152">
    <assemblyidentity>BusinessObjects, Version=, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL</assemblyidentity>
      <stats acp="95" afp="80" abp="95" acc="20" ccavg="1.57" ccmax="3" ex="0" ei="1" ubp="0" udp="0" ul="0" um="0" usp="0" vbp="77" vdp="0" vl="96" vsp="96" mvc="14" vc="1" vm="38" svc="152">
        <stats acp="95" afp="80" abp="95" acc="20" ccavg="1.40" ccmax="3" ex="0" ei="1" cc="1.40;3" ubp="0" udp="0" ul="0" um="0" usp="0" vbp="9" vdp="0" vl="12" vsp="12" mvc="5" vc="1" vm="5" svc="16">
         <en>BusinessObjects.Customer.ctor() : void</en>
         <stats acp="95" afp="80" abp="95" acc="20" ccavg="1.00" ccmax="1" ex="0" ei="1" cc="1.00;1" ubp="0" udp="0" ul="0" um="0" usp="0" vbp="1" vdp="0" vl="0" vsp="0" mvc="4" vc="4" vm="1" svc="4">
         <signature>.ctor() : void</signature>

If you still need technical assistance, we can help:

Submit A Support Ticket

Try NCover Free Contact Us Online