Jared's Weblog

Main Page - Books - Links - Resources - About - Contact Me - RSS


Jared Richardson Most Popular
Help! I've Inherited Legacy Code
Testing Untestable Code
Continuous Integration... Why Bother?
Mock Client Testing
The Art of Work
Technical Idiot Savants
Targetted Skills Aquition vs Free Range Chickens
The Habits of Highly Effective Developers



Blog Archive
2005-December
2005-November
2005-October
2005-September
2005-August
2005-July
2005-June

Mon, 22 Aug 2005

Java code coverage: Cobertura 1.6 released

I was fortunate enough to be involved with getting the JCoverage fork (called Cobertura) launched. Although my role was primarily managerial, not technical, I still enjoy watching it grow. SourceForge tells me that the project has nearly 250,000 "Project Web Hits". Today Mark Doliner and company (Grzegorz Lukasik, Jeremy Thomerson and others) released version 1.6 of Cobertura.

If you are writing tests, you need to know what code is being excercised and what code is being missed. A code coverage tool should be a part of your toolbox. If you've never used one before, you may be very surprised at what it shows you.

Here's a sample Cobertura report. The web site has sample Ant tasks to get you started quickly. Here are a few of the Cobertura features:

Of course the project is using CruiseControl, under multiple JDKs! See here.

If you're still not sure you want to tackle Java code coverage, read Measure test coverage with Cobertura by Elliotte Rusty Harold, an article on IBM's developerWorks site.

Enjoy!

Jared

posted at: 19:01 | path: | permanent link to this entry