tags:

views:

98

answers:

1

I generate a coverage.xml output file with the following command.

"C:\Program Files\NCover\NCover.Console.exe" //reg //w "D:\BuildServer\MyCoolWebsite\Working\MyCoolWebsite.Helpers.Tests\bin\Debug" //l "Coverage.log" //a MyCoolWebsite.Helpers //x "D:\BuildServer\MyCoolWebsite\Artifacts\buildlogs\coverage.xml" "C:\Program Files\NUnit 2.4.8\bin\nunit-console.exe" "D:\BuildServer\MyCoolWebsite\Working\MyCoolWebsite.Helpers.Tests\MyCoolWebsite.Helpers.Tests.nunit"

Then I try to parse the xml using the xsls from the C:\Program Files\NCover\CC.Net folder. The result is an almost empty html file.

The reason for this is that the xsl expects the following:

coverage -> module -> method -> seqpnt -> @visitcount

While the xml has a structure that looks like this

coverage -> module -> class -> method -> seqpnt -> @vc

Does NCover output the correct XML version for my XSL? Is there a setting I am missing?

+1  A: 

You're probably not missing a setting. The xsl looks like it's for NCover v1.5.8 and earlier, while the xml is probably from v2.1 or later. I know there were some mixups in the earlier releases of NCover, but if you're using 2.1.2 or later the xsl should match. The fastest remedy is just to download the most recent version of NCover and get the xsl from that.

Stephen Ward