1

The higher ups want a report of the unit test coverage. We have cobertura on an ant script. This will generate a big list of html files. It would be awesome to just run cobertura on a build server for all to see, but we don't have one yet :(.

My question is, is there an easy way to export the cobertura report into something managers like to read, specifically an excel sheet?

3 Answers 3

0

There isn't an out of the box way to do this. Your best bet is to run Apache locally and serve the HTML files using the server. You don't need an external build server to do this, you can easily host this on a mac, linux, or windows dev box.

Past that, you should really set up a build server if you have a team, do you have source control running somewhere?

2
  • This was the best solution in the end, just serving up the html pages on a server. Too much work otherwise. Our build server should be up soon.
    – Slamice
    Jun 1, 2012 at 0:38
  • I think you'll be happy with this, I think the information would be a little tough to organize in a spreadsheet anyways (even if they did it) Jun 1, 2012 at 2:17
0

I suggest installing Sonar and configuring your build to publish it's code coverage metrics there. Lots of other good reasons to run Sonar, it's actually surprisingly easy to setup and integrate.

The following answer explains how to integrate cobertura and Sonar within an ANT build:

SONAR - Measure Code Coverage using Cobertura

0

Well, this is sucky... Your only output format choices in Cobertura are XML or HTML.

  1. Will an HTML file be okay? That's very readable, you could print it out for them. Maybe even embed it in an email.

  2. How are you at XSLT? There's an XSLT task in Ant. You can use XSLT to transform your XML file into a comma separated value file that could be read in Excel.

The second one isn't that bad. XSLT isn't a hard language to learn, and it shouldn't take too long to translate the file using XSLT. I've done this a few times in Ant. Not enough to actually be good at XSLT, but enough times to know that learning how to do this isn't that bad a deal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.