How do I get the coverage percentage from xml rpt

How do I get the coverage percentage from xml rpt

We've upgraded from 2.X to 3.0 recently on our build system. We have about 100 solution files being built by NAnt and unit tested using NUnit and NCover.

We execute ncover.console.exe calling NUnit and using the //x parameter to specify the results xml file.

Then we run ncoverexplorer.console.exe on the xml results to produce html and xml reports.

The html reports are fine, but we were using the xml reports to extract the coverage percentage and the acceptable level for each report to generate a custom report on the coverage of all of the solutions we build. We used the following XPath for these values: /coverageReport2/project/@coverage

/coverageReport2/project/@acceptable

The xml report file has changed dramatically with version 3.0. How do I now get my coverage value from the report?

/trendcoveragedata/stats/@acp would appear to give the acceptable level, but I do not see a corresponding coverage value (and the attribute names are a bit cryptic).


RE: How do I get the coverage percentage from xml rpt

ACRACONTROL,

We have a doc that provides specs on those attribute names: http://docs.ncover.com/kb/ncover-trend-and-report-file-definition/. Keep in mind that symbol coverage percentage calculation is vsp / (usp + vsp). These are broken into their components to save space for users with reports that go into the 50-100MB range.

Thanks for using NCover! We're here to help if you need us.