As others have said, this isn't really something to worry about. But if you want to get the number up as high as possible, you could do what I've done in the past: When running the coverage tool, configure your log framework to use a special configuration file that sets the level to DEBUG
and make's sure no appenders are actually set (I did the latter part so any command line output of EMMA would not be drowned out by my logging output).
Here's what I did with EMMA and Ant, of course the exact config will change depending on your tool:
Ant runs junit (in my 'tests' target) with a special log4j.properties:
<junit printsummary="on" fork="true" haltonfailure="false"
failureproperty="tests.failed" showoutput="false">
<!-- specify a special log4j config file for running the unit tests -->
<jvmarg value="-Dlog4j.configuration=test/ant-junit-log4j.properties"/>
...
And the contents of ant-junit-log4j.properties
:
#Special log4j.properties file used for running junit test cases from Ant
#we want to minimize output to the build script
#Note that appender CONSOLE has a threshold set to OFF so that it never actually logs
#Set the level to DEBUG so that all logging lines are hit in code coverage tests
log4j.rootCategory=DEBUG, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern= %-5p %c - %m%n
log4j.appender.CONSOLE.threshold = OFF