I am fairly new to JaCoCo and have just integrated it into my build process for a project I am working on.
I am currently using netbeans 7.3 beta on debian linux linux (wheezy) with JUnit 4.10.
The netbeans project is not a maven project and as such I have manually altered the build.xml file to include the JaCoCo ant tasks and targets.
The build runs fine and is generating a coverage report as I would expect, but I have noticed a few funnies.
One thing is that if my classes are utility type classes that only contain static methods and do not have a constructors I do not get 100% test coverage.. Eg
public class Utils
{
// NOTE no default constructor.
public void static Method1()
{
}
public void static Method2()
{
}
}
Is there any way to force the JaCoCo tool to ignore this? Is this a bug or is the tool assuming that all classes have a default constructor ?
I don't particularly want to create a default constructor in the affected classes to get the coverage up as an instance of these classes
does not make any sense in my design as they are utility classes.
Many thanks for any feedback.
Steve Williams