Open Source Tools available.
First search.
- Jumble - http://jumble.sourceforge.net/
- Quilt - http://quilt.sourceforge.net/
- Coverlipse - http://coverlipse.sourceforge.net/index.php
- Xradar - http://xradar.sourceforge.net
- Sonar - http://sonar.hortis.ch/features/
Interesting.
- Findbugs and Junit - http://cs.ubc.ca/~ericazhj/papers/pl.pdf
First Experiment a success.
An excellent method for generating coverage reports is part of the maven 2 build. If you instrument the code for coverage and then run surefire reports the Junit tests are run and then an actual report of coverage can be automatically generated.
First results were negative. Adding the right information to the top level pom generated the correct tests, but sadly alsogenerated the reports with zero length. Conclusion: Either I failed to add the correct information or this is an unwanted bug. However, going down to the modules the report generation succeeded.
Example.
Add at the end of a pom.xml before the last closing tag.
<reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <configuration> <formats> <format>xml</format> <format>html</format> </formats> </configuration> </plugin> </plugins> </reporting> <pluginRepositories> <pluginRepository> <id>Codehaus Snapshots</id> <url>http://snapshots.repository.codehaus.org/</url> </pluginRepository> </pluginRepositories>
At the same directory level as the pom.xml run mvn cobertura:cobertura.
Under the directory target/site is the beginning of the report.
Brut force but functional
Some relatively straight foward Perl code can perform the following workflow:
- inject into the pom.xml (s) the relevant fragments.
- Run maven on each Pom
- Harvest all relevant information
- Make a generic high level report/website.