Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
I've discovered an issue with the latest code coverage plugin. This worked fine with the older grails 1.0.3 and .9 version of the coverage plugin.
Attached is a grails plugin that uses your plugin to generate coverage numbers. You'll notice that it reports 0% coverage which is incorrect. What I discovered is that if you use the code coverage plugin in a plugin and some of the code you are testing is included in the doWithSpring closure, you get 0 coverage numbers.
If you run test-app on the attached plugin you'll see 0%.
Then comment out the following from the CoverageBugGrailsPlugin.groovy
def doWithSpring = {
pResolver(com.travelocity.grails.plugins.configuration.io.ResourcePathResolver) {
pathPrefix = "/var"
}
}
Do a grails clean and grails test-app again and you'll get coverage.
Thanks for your time,
Tony Perkins
Attachments
Issue Links
| This issue duplicates: | ||||
| GPCODECOVERAGE-18 | coverage not applied to classes in plugin.groovy |
|
|
|
I have the following plugins installed in my grails app (1.1.1)
plugins.mail=0.7.1
plugins.acegi=0.5.2
plugins.flex=0.2
plugins.crypto=2.0
plugins.code-coverage=1.1.7
plugins.hibernate=1.1.1
And I'm getting the same problem with my tests. So this is issue is not affecting only plugin projects but projects that use plugins that use the doWithSpring closure