beckje01 / grails-code-coverage

Git Repo of the Grails Code Coverage plugin.
http://grails.org/plugin/code-coverage
16 stars 26 forks source link

Difference in coverage when plugin updated from 2.0.3-2 to 2.0.3-3 #35

Open dmahapatro opened 9 years ago

dmahapatro commented 9 years ago

I noticed a considerable change is coverage immediately after I upgraded to plugin to use v2.0.3-3 from v2.0.3-2. I found out the root cause to be:

//_Events.groovy
dataFile = System.properties["net.sourceforge.cobertura.datafile"] ?: "${basedir}/cobertura.ser"

_Events.groovy is already on the classpath so dataFile = "cobertura.ser" should be enough. After adding the absolute path (using basedir) I see the data file is not cleared/deleted on subsequent coverage calls.

I see below behavior changes using the latest version: