Closed halfbaked closed 10 years ago
What version of grails are you using?
Hey Jeff, it is Grails version 2.3.7
And forked mode is off? I have it working with 2.3.7 If you can either let me see the project or create a simple test project that has the same error that would be very helpful.
I tried both forked and unforked. Makes sense that you need an example. I'll see what I can do.
On 25 June 2014 15:45, Jeff Beck notifications@github.com wrote:
And forked mode is off? I have it working with 2.3.7 If you can either let me see the project or create a simple test project that has the same error that would be very helpful.
— Reply to this email directly or view it on GitHub https://github.com/beckje01/grails-code-coverage/issues/28#issuecomment-47102320 .
I will also try to reproduce with some projects at work that need updated anyway.
Jeff
I tried with 2.3.4 and 2.3.7 and I'm not reproducing the issue yet. You should see a message like:
Instrumenting classes for coverage... INFO: Found ASM 3: /Users/jeff.beck/.m2/repository/asm/asm/3.3.1/asm-3.3.1.jar.
Do you see anything like that after the instrumenting classes for coverage?
Yes, I see the following:
| *Instrumenting classes for coverage...
INFO: Found ASM 3: /Users/34m0/.m2/repository/asm/asm/3.3.1/asm-3.3.1.jar.
Possibly because grails-core (grails-plugin-databinding) uses it.
Removing from instrumentation classpath!
[java] Java Result: 1
| *Tests PASSED - view reports in /Users/34m0/Dev/proj/myProj/target/test-reports
Jun 26, 2014 8:49:21 AM net.sourceforge.cobertura.coveragedata.ProjectData loadCoverageDataFromDatafile
INFO: Cobertura: Coverage data file /Users/34m0/Dev/proj/myProj/cobertura.ser either does not exist or is not readable. Creating a new data file.
Jun 26, 2014 8:49:21 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler saveCoverageData
INFO: Cobertura: Saved information on 0 classes.
Done with post processing reports in 8ms
| *Cobertura Code Coverage Complete (view reports in: /Users/34m0/Dev/proj/myProj/target/test-reports/cobertura)
Jun 26, 2014 8:49:25 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler loadCoverageData
INFO: Cobertura: Loaded information on 0 classes.
Jun 26, 2014 8:49:25 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler saveCoverageData
INFO: Cobertura: Saved information on 0 classes.
Done with post processing reports in 10ms
I wonder if there is some plugin or other doing something funky that disturbs the coverage plugin.
For example, I use the i18nEnum plugin, uses AST transformation
On 26 June 2014 07:46, Jeff Beck notifications@github.com wrote:
I tried with 2.3.4 and 2.3.7 and I'm not reproducing the issue yet. You should see a message like:
Instrumenting classes for coverage... INFO: Found ASM 3: /Users/jeff.beck/.m2/repository/asm/asm/3.3.1/asm-3.3.1.jar.
Do you see anything like that after the instrumenting classes for coverage?
— Reply to this email directly or view it on GitHub https://github.com/beckje01/grails-code-coverage/issues/28#issuecomment-47189830 .
I haven't used that plugin before do you mind setting up a skeleton project with that plugin being used how you would expect?
I falsely accused that plugin ;) I went through the various plugins of my real app on a sample app, and by process of elimination found the culprit to be: markdown ( https://bitbucket.org/tednaleid/grails-markdown).
On 26 June 2014 15:26, Jeff Beck notifications@github.com wrote:
I haven't used that plugin before do you mind setting up a skeleton project with that plugin being used how you would expect?
— Reply to this email directly or view it on GitHub https://github.com/beckje01/grails-code-coverage/issues/28#issuecomment-47224815 .
Jeff, an update for you: either plugin on its own does not appear to cause the issue, but the combination of both plugins I mention does. I've put a sample project together which I hope also doesn't work for you: https://github.com/halfbaked/sample-grails-cobertura
Run:
grails clean && grails test-app unit: -coverage
And you should see:
Cobertura: Saved information on 0 classes.
Thanks for all the help, I think I have a fix now I did a pull request check out https://github.com/halfbaked/sample-grails-cobertura/pull/1
Do you know when did fix will be released?
@marcos-carceles I'll review your PR today and look at releasing a version today/tomorrow
Using the latest version of the plugin, the coverage.xml file has and an empty packages node, where in the old version it was full of data.
I see the following in the logs: