2

I get code coverage generated for a Grails project that I'm working on. But, I would like it to generate xml-files, so e.g. Sonar can disgest it and append it to its reporting.

The command line I'm executing: grails test-app unit: -coverage -xml ... and I get HTML-files ...

I tried adding a coverage section to my BuildConfig.groovy, but it seems to be ignored:

coverage {
        enabledByDefault = true
        xml = true
}

I have tried different versions (1.2.6, 1.2.7 and 2.0.3-3) of the Cobertura plug-in but the result seems the same; nice html-files but no xml.

Something with the version of Grails (2.0.4) in the project in combination with the Cobertura plug-in? Something else I've missed?

Any pointers or suggestions will be appreciated.

Edit (2015-12-02): I turned on the --verbose flag, and it turns out that the XMLReporter dumps data for output. But still, and here is where the mystery is; the output is not xml, but html for some obscure reason. Any other parameter I might have missed?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.