What are you looking for
Since Jens Piegsa indicated id, what you are looking for is a tool that shows you test coverage, in other words, the percentage of code that you use for testing.
This allows you to see how much you are testing the code, actually a more reliable way than (at least a class test).
You can use Cobertura, which is well integrated in Maven: http://mojo.codehaus.org/cobertura-maven-plugin/
Way to achieve this
POM configuration
Just put this piece of code in your pom.xml
<project> ... <reporting> <plugins> ... <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.6</version> </plugin> </plugins> </reporting> </project>
Coverage launch
And run
mvn cobertura:cobertura
Or run the report phase (tied to site generation)
mvn site:site
Adding a Quality Threshold
You can even add an error threshold if you want to invalidate low coverage buildings
<plugin> [...] <configuration> <check> <haltOnFailure>true</haltOnFailure> <lineRate>80</lineRate> <branchRate>80</branchRate> <totalLineRate>90</totalLineRate> <totalBranchRate>90</totalBranchRate> </check> </configuration> </plugin>
source share