Zdanek devBlog+

April 26, 2010

Zero Cobertura coverage

Filed under: develop, maven — Tags: , , — zdanek @ 14:58

Recently I had zero code coverage during tests. I had a maven2 project (under maven 1.0.9), with default cobertura version, which was 1.9.

All reports were generated normally except all code coverage was zero (0).

The reason was somehow buggy cobertura version 1.9.
After I put cobertura-maven-plugin configuration into my pom.xml specifying cobertura version 2.4


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.4</version>
</plugin>

all went well and finally I had my non-zero coverage :D

(Edit: I’ve added some pretty screenshots :])

Powered by WordPress

WP-Highlight