grails-code-coverage icon indicating copy to clipboard operation
grails-code-coverage copied to clipboard

Plugin not including coverage report for classes in inline grails plugins

Open asuraphel opened this issue 9 years ago • 5 comments

We have split up our application into smaller plugins and most of our code is in those plugins. However grails-code-coverage doesn't seem to report on the plugin classes. Is this a bug or unsupported functionality?

asuraphel avatar Sep 17 '15 08:09 asuraphel

You would use the the coverage tool in each of your plugins builds directly.

beckje01 avatar Sep 17 '15 12:09 beckje01

@beckje01 It's just one app with a few plugins. Did you mean we should put the grails-code-coverage plugin inside all plugin's BuildConfig.groovy?

asuraphel avatar Sep 17 '15 16:09 asuraphel

Ahh I didn't know it was inline plugins, in that case you could just add the extra source roots. Check out the sourceInclusions in the readme.

beckje01 avatar Sep 18 '15 13:09 beckje01

@beckje01 I tried doing:

coverage {
    sourceInclusions = ['../inline-plugin-name/grails-app/services']
}

However, the service classes inside that plugin are not showing on the coverage report. Am I missing something?

asuraphel avatar Sep 23 '15 09:09 asuraphel

@beckje01 Superficially going through the code I see that classes are instrumented from classDir and the plugin's class files are inside work/plugin-classes. I think source inclusions feature will not work. Don't you think so?

asuraphel avatar Sep 25 '15 09:09 asuraphel