Cobertura is a free Java tool that calculates the percentage of code accessed by tests. It can be used to identify which parts of your Java program are lacking test coverage. It is based on jcoverage.
No matter how good such methodologies are, and how diligently they're followed in an organisation, it isn't possible to ensure that software testing is as comprehensive as it could be. That's where tools can help.
Cobertura is a free, simple and easy-to-use tool that will complement your existing Java development practices. It helps you discover exactly where your software is being tested and, more importantly, where it isn't. Cobertura will help you to view your software from a number of levels, from the entire system right down to an individual line of code.
Sure, there are other coverage tools around, so what makes Cobertura different?
Coverage analysers work by adding instrumentation. For Java, coverage analysers fall into three categories: those that insert instrumentation into the source code, those that add instrumentation to the Java byte-code, and those that run the code in a modified JVM. Cobertura adds instrumentation directly to the bytecode. We feel this is the best approach, since it does not require a modified VM, but still retains a big speed advantage over having to compile all your source code twice.
Secondly, Cobertura is easy to integrate with Apache Ant. It comes with it's own Ant task definitions for you to use. You can choose to instrument any code you wish, from a single class to an entire system.
Finally, Cobertura is completely free and not time-locked, so you can begin to use it today, without having to worry about what to do at the end of an evaluation period. What's more, we believe Cobertura is so easy to use, you'll be up and running in no time. So why not spend the next 15 minutes getting up and running with Cobertura. In that time, you'll certainly find out which parts of your code are completely tested, and where your code could do with a bit more testing.
http://cobertura.sourceforge.net/