I'm currently in the process of becoming a TDD hacker. As part of this I feel that a code coverage report like the one Cobertura generates is a essential piece of tool.
But, my code coverage is somewhat bloated as the following code doesn't get covered correctly:
if(logger.isLoggable(Level.INFO)) {
logger.info("blah blah blah");
}
I'm running the report within Jenkins and Maven (don't know is that can be a problem?). isLoggable(Level.INFO)
is (in my case) always true thus it enters and logs. I'd like to be able to either skip the part or be able to set isLoggable(Level.XX)
to true AND false.
Any ideas, hints etc? Maybe something I have overlooked, everything is much appreciated! :)
[edit] Seems like a bug in the Maven cobertura plugin which should be fixed in 2.6: http://jira.codehaus.org/browse/MCOBERTURA-52 BUT 2.6 haven't been released, so I'll just have to wait... [/edit]