May 18th, 2010, 04:18 PM
So I thought I'd institute code coverage in our team. I've got cobertura up and running. The problem is that it is lying to us.
The instrumented jar contains a particular package with eight classes in it. If I run the tests I get a report that shows 100% coverage for that package, but only shows 3 classes (the classes that were loaded during testing). It completely misses that the other 5 were untested.
Is cobertura really completely broken, or am I doing something wrong?
In the meantime, is there some way to force all classes in a jar to be loaded, or am I going to have to brute force read the jar contents and do a Class.forName() ?
Thanks in advance.
May 18th, 2010, 04:57 PM
Fixed. We had datafile specified for all cobertura tasks except the instrument task.