Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hudson cobertura reporting 0

I have a problem that when I run the cobertura target maven, the report always shows 0%.I've tried forking my junit tests, and no luck. I've tried configuring the cobertura plugin in the reporting section and build section of the pom, and also tried binding it to both the site and package phase. Any thoughts?

On a related note, I've also noticed that running the tests in Cobertura within hudson causes the junit plugin to report that each test was run twice (which doubles the number of tests reported as run). Any way around this?

thanks,

Jeff

like image 235
Jeff Storey Avatar asked Jun 19 '09 00:06

Jeff Storey


People also ask

Where is cobertura report generated?

cobertura-report generates coverage reports from the source code directories and calculates the cyclomatic code complexity of each class. The HTML reports are also made of annotated versions of each source file, showing which lines of code were excercised.


2 Answers

There is a compatibility issue with JDK 1.6.0_14 and the cobertura plugin. And the plugin also has problems with multithreaded tests. The 0% problem was fixed by used b7 of JDK6, and maybe a fix will come out for the multithreading soon (there is a patch available)

like image 126
Jeff Storey Avatar answered Sep 30 '22 01:09

Jeff Storey


I think it would be helpful to post whatever part of the pom.xml you define your Cobertura plugin and where in your profile you actually use it. Could you provide this so it provides some context for someone to look at? While I'm sure that copying/pasting [http://mojo.codehaus.org/cobertura-maven-plugin/usage.html] wouldn't help any of us out, perhaps providing your < include> and < excludes> can help out.

like image 36
Nick Klauer Avatar answered Sep 30 '22 02:09

Nick Klauer