beckje01 / grails-code-coverage

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

Caching coverage results #22

Closed senorbum closed 10 years ago

senorbum commented 10 years ago

When I run coverage on an integration test, it seems like the results are being cached. For example, I run coverage on one single integration test, which just hits a few classes, but its coming back with coverage results for my entire project.

I've tried clearing the target/test-reports directory completely, but the results are unchanged. This is the command I use to execute my tests:

test-app -integration mypackage.MyClass -coverage

I also tried

test-app integration: mypackage.MyClass -coverage

and the standard grails clean/refresh dependencies. My entry in build config looks like:

plugins{
...
test ":plastic-criteria:0.9"
test ":code-coverage:1.2.7"
...
}

After all of this, I went and commented out the code-coverage plugin in BuildConfig.groovy, ran my test and ran my application. I then re-added the plugin and it didn't seem to make a difference. The last thing I tried was to run

test-app integration: mypackage.MyClass -coverage -nopppend

At one point recently I switched my ivy-cache directory to be under target, not sure if this would have any impact.

beckje01 commented 10 years ago

So the results are stored in a file called cobetura.ser that is the file that would need to be cleared. Could you try with the latest version of the plugin and if you are still getting the same results let me know

beckje01 commented 10 years ago

No updates for a while