This post originated from an RSS feed registered with Agile Buzz
by Jared Richardson.
Original Post: Java Code Coverage Tool Cobertura Released
Feed Title: Jared's Weblog
Feed URL: http://www.jaredrichardson.net/blog/index.rss
Feed Description: Jared's weblog.
The web site was created after the launch of the book "Ship It!" and discusses issues from Continuous Integration to web hosting providers.
The open source toolkit Cobertura released a new version this week. They made some major additions, including support for AspectJ compiled code. Cobertura continues to improve with every release.
It's adoption is increasing as well. The SourceForge statistics page says Cobertura's had over 7,000 downloads and more than 400,000 hits on the web site.
Are you using code coverage? A coverage tool will tell you what parts of your source code are being exercised by your test code and what parts aren't. It's the only effective way to knowing what code is completely untested. It formats this information in XML files or, if you prefer, a nice report to make it easy to digest.
Here's a quote from the release notes:
We've
just released Cobertura 1.7. We fixed the problems with the merge task,
as well as a few other bugs. The full list of changes is below.
log4j is no longer used by the
Cobertura classes that are accessed by instrumented Java code. This
means you will not need to add log4j to your project's classpath in
order to use Cobertura (but log4j is still required when instrumenting
and reporting).
Upgraded from asm 2.0 to asm 2.1. No code changes were needed.
Improved the merge task. It should work correctly now (with help from Björn Beskow).
Fixed the ability to specify a data file in the merge task.
Changed the command-line interface to the merge task and added a helper batch/shell script.
Added better error checking to the merge task.
Fixed
a bug where an empty or incomplete coverage data file would be written
when you test classes inside Tomcat, and you stop Tomcat using the
shutdown.bat or shutdown.sh scripts. This would result in an
EOFException when running cobertura-report.