How to generate a single xml file with coverage

How to generate a single xml file with coverage

I'm not sure which forum to put this in, so here it is.

I'm evaluating this program for my company. They have an automated build that builds after every submission. However, if test cases from NUnit tests fail, the build fails.

What they want is ability to check coverage of the newly updated files against the older versions, and if it drops, the build will fail.

Now, I need to be able to generate one simple xml file that lists classes and class methods and their testing coverage. Then I can create a simple program that compares it against previous successful build to see if coverage drops, if so then return an value that will cause the build to fail.

How do I generate that xml file? I tried generating the normal xml file, but all it reports are the functions and classes and how big they are. I don't see any coverage percentage.

Basically what I want is a xml file that have this:

AClassName.AMethod1 - 56%

AClassName.AMethod2 - 100%

BClassName.AMethod - 0%

or something similar.

If you could point me to the correct step, I'd be grateful (and our company might buy licenses for your software if they like how it works).


RE: How to generate a single xml file with coverage

I've figured out how to create a single xml file with coverage. I thought ncover.console would generate it, but I realized I have to run ncover.reporting as well.

Now my problem is, how do I read the data so I can figure out the percentage? Is there a reference I can use to analyze the data? Thanks


RE: How to generate a single xml file with coverage

Nevermind, I found the page with details about each attribute. I was able to develop a program that compare current and new build. Seeing if my supervisor likes it :)


RE: How to generate a single xml file with coverage

Glad you got this figured out, sir...