Code Coverage Tools
A recent problem arose at work where our code coverage tool, Cobertura ceased to work for a particular application. Well actually, "ceased" is the wrong word. It didn't work from the get-go. We had however, been using Cobertura succesfully with other apps. We discovered that the problem was due this particular app already having it's bytecode instrumented by a tool called Versant Enhancer. So we had both Versant Enhancer and Cobertura trying to instrument the same bytecode with the result that either the code didn't work, or we got no coverage figures, or both.
So what to do? We like Cobertura but we can't use it on this app unless Cobertura or Versant engages in a major re-write for our sake. Which isn't gonna happen.
Another coverage tool is Emma, but that too instruments the bytecode, ruling it out.
We also have access to PureCoverage* but found it to be too unstable in our Java development environment (haven't tried it with C) to be useful.
Finally a viable alternative to Cobertura emerged.
Clover is a commercial coverage tool that instruments the sourcecode, thereby preventing our problem with Versant. We're about to start trials to make sure this is the case, and I'll post the results in a few weeks.
To sum up:
ByteCode Instrumentation Coverage Tools:
Cobertura
EMMA
SourceCode Instrumentation Tools:
Clover
You can check Cobertura out here:
http://cobertura.sourceforge.net/
You can check EMMA out here:
http://emma.sourceforge.net/
You can check Clover out here:
http://www.cenqua.com/clover/
*PureCoverage is available only as part of Rational PurifyPlus. I've included a link to that product in the sidebar.

