This repository was archived by the owner on Nov 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Code Coverage
PINGUET Julien edited this page Sep 20, 2015
·
2 revisions
"Code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite." WikiPedia
This popular tool is not supported by Java 8:
- work with Eclipse
- not work with Maven
Plugin: eCobertura (Eclipse addon)
Require: JVM option -noverify
<project>
<properties>
<cobertura.version>2.7</cobertura.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>${cobertura.version}</version>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>${cobertura.version}</version>
</plugin>
</plugins>
</reporting>
</project>Run : mvn cobertura:cobertura
Plugin: EclEmma Java Code Coverage
<project>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
</plugin>
</plugins>
</build>
</project>