How to verify your CC.NET report file and optionally send a good support request

How to verify your CC.NET report file and optionally send a good support request

A few customers are reporting integration issues with CC.NET v1.4+ and NCover v3.0. Our last blog post addressed the issue with the graph images not displaying correctly. This blog post is going to expand on the other integration issue that people are experiencing, which is the report showing N/A and NAN% for the coverage percentages.

The first thing you need to do is look at the url for the report. An example url would look like this

http://server/ccnet/server/local/project/NCover+Tests/build/log20090218054153Lbuild.2.xml/NCoverBuildReport.aspx. You want to look at the part right after /build/, in our case “log20090218054153Lbuild.2.xml”, this is the artifact that is being transformed using the NCover3XmlReport.xsl file.

In order to determine the location of this file, look in your ccnet.config file for the following tag for your project: <artifactDirectory>D:\ccnet\artifacts\ncover3</artifactDirectory>

This is the folder that will contain the artifact. Open this file in a text editor and you should notice the root node should look something like this: <cruisecontrol project="NCover Tests">

Under this node, you may see a tag called “buildresults”

<buildresults>
  <message>NCover Reporting Complete v3.0.14 x86 (Administrator)</message>
  <message>Merging and Reporting for NCover</message>
  <message>Copyright (c) 2007 - 2009 Gnoso Inc.</message>
  <message>http://www.ncover.com</message>;
  <message>Wrote xml report to 'D:\ccnet\artifacts\ncover3\symmarymodule.xml'</message>
  <message>Execution Time: 3,453 ms</message>
</buildresults>

This is the output that came from ncover.reporting.exe during the run process.

The next section you should see is the information used for the transformation

<trendcoveragedata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">;
  <en>::coverage.xml::</en>
  <stats acp="95" afp="80" ccavg="2.44" ccmax="106" ex="0" ei="1" cc="2.44,106" ubp="8098" udp="0" ul="11485" um="3036" usp="11156" vbp="8503" vdp="0" vl="10667" vsp="10738" mvc="30211284" vc="1" vm="3897" svc="401794353" />

If you do not have the <trendcoveragedata> node in your artifact, there is an error in your ccnet.config file, please read the readme.txt file or this following url.

If all of this information exists, and your <trendcoveragedata> contains at least one <doc> element and one or more <mod> elements, then you should contact support (http://www.ncover.com/support/ticket) to see if we can help you once you verify the following items.

  1. If you are receiving NAN% or N/A% for Symbol coverage, first verify that at least one of the <stats> nodes has non-zero values for the usp and vsp attributes. If all of the vsp and usp attributes are 0 (zero), the PDB symbols were not available at the time you ran coverage. The vl and ul (visited lines and unvisited lines) will also be 0 if PDB symbols were not available.

  2. If you are receiving N/A for Cyclomatic Complexity, verify that the ccavg and ccmax numbers are not 0. If they are and you are running the Complete edition of NCover, you may have not included Cyclomatic Complexity coverage when you ran coverage. Please verify your options for the //ct flag. By default we capture all of the information allowed by your edition. If you passed in flags, you have limited the data that we are going to collect.