Explanation for XML Tags used in Coverage.XML
Explanation for XML Tags used in Coverage.XML
I do realize that I can use Ncover Explorer to generate an HTML report from my Coverage.XML file but I want to be able to generate my own custom Report by parsing the XML. Is there documentation available, explaining the different XML Tags and Options.
For Example how does the XML information (such as nid, vc, o, l , el, c, ec) translate to Branch, Method and Symbol coverage.
RE: Explanation for XML Tags used in Coverage.XML
We do not have a document to explain the Coverage xml but we do have some information on the report xml, which is the report that is output using //r using the /rf Xml option.
This report has the numbers rolled up to allow you to need less understanding of the coverage file.
Is this something you would like a dump of the elements?
You are also free to modify the xslt file that came with ncover to create custom reports.
Joe
RE: Explanation for XML Tags used in Coverage.XML
I think I should modify the XSLT file for my purpose.
Thank you.
RE: Explanation for XML Tags used in Coverage.XML
I also think it would be useful to have a description of the various XML tags and attributes. The problem is that the NCoverSummary.xsl that comes with CruiseControl.NET doesn't work with NCover 3.0. I would like to display a summary rather than using the coverage report for both the report AND the summary. Is there a decent NCover summary xsl file we can use for CruiseControl.NET ? I would write my own, but I need to know the meanings of the various XML attributes. Any help would be appreciated.
RE: Explanation for XML Tags used in Coverage.XML
The NCoverReporting task - http://www.ncover.com/documentation/3/reporting/ - generates output that is easier to work with. Set the ReportType='xml'.
I just used this output to generate a brief summary that appears in the CCNet build email:
<xsl:variable name="stats" select="//trendcoveragedata/stats"/>
<xsl:variable name="stats.linesofcode" select="$stats/@vl + $stats/@ul"/>
<xsl:variable name="stats.cyclomaticcomplexity" select="$stats/@ccmax"/>
<xsl:variable name="stats.totalpoints" select="$stats/@vsp + $stats/@usp"/>
<xsl:variable name="stats.coverage" select="round($stats/@vsp div $stats.totalpoints * 100)"/>
Also NCover 3.0 includes XSLs that replace the ones that ship with CCNet. There are instructions on ythe blog at:
http://www.ncover.com/blog/2009/02/18/my-images-do-not-show-up-in-ccnet-what-do-i-do
RE: Explanation for XML Tags used in Coverage.XML
There are four different summary reports that come with NCover 3 and all of them work with the same xslt file.
If you are attempting to create two reports at the same time, the trick is to make a second copy of the xslt file and hard code the report type variable at the top of the file to the report you wish to see.
Joe
RE: Explanation for XML Tags used in Coverage.XML
Thanks Kevin for answering.
We try not to document the coverage file nodes since they are subject to change and are not designed to be reported with.
The Xml output for reporting is a format that we plan on keeping the format readable by all. If you notice we have performed a bunch of rollups so you do not need to understand the format.
If you email support, we can send you some high level information on the report file format.
Thank you,
Joe Feser