Java News from Wednesday, February 8, 2006

Cenqua has released Clover 1.3.12, a $250 payware unit test coverage tool. 1.3.12 "is a bugfix release. It addresses a problem that prevented Clover-instrumented classes from loading correctly in JBoss 3.x under some conditions. It also includes various minor improvements and bugfixes." Clover modifies the source code to enable it to follow which statements are executed when, and keeps a running count of how many times each statement is executed during the test suite. Any statement that executes zero times is not being tested. I use Clover with Ant, but there are also versions for NetBeans, Eclipse, IntelliJ IDEA, and Oracle JDeveloper 10g. Clover can generate test coverage reports in XML, HTML, PDF, or via a Swing Viewer. Java 1.2 or later is required.

As usual I tested this release on XOM. I've been doing some updates on XOM lately, so I was curious to see how the code coverage was holding up. Externally the changes since the 1.1 release in November are quite minor, but internally I'd completely rewritten one class, and made very significant changes in several others since the last time I measured the coverage. A few things I noticed:

They're a few other places that appear to be minor uncovered fragments, nothing too shocking. I'll have to look into these in more detail. Bottom line: if it isn't tested, it is buggy.

If anyone would like to hear more about this subject, tonight I'll be in Albany to talk to the Capital District Java Developer's Network on the subject of Measuring JUnit Code Coverage. The meeting starts at 6:00. If Albany's a little far for you, I'd be glad to repeat this talk for other user groups, conferences, or companies. Just drop me a line. I'll post the notes here tomorrow.