Grails Clover: cannot find clover report xml

Hi,

I started adding clover to our cloudbees system today. It seems trivial but so far i still got error:

"Clover xml file does not exist in: /scratch/jenkins/workspace/.../target/test-reports/clover called: clover.xml and will not be copied to: .../builds/2015-04-29_20-20-50/clover.xml

Could not find 'target/test-reports/clover/clover.xml'. Did you generate the XML report for Clover?"

Even though I already defined them in the clover plugin (Publish Clover Coverage Report):

Clover report directory= target/test-reports/clover

Clover report file name= clover.xml

and in default BuildConfig.groovy:

reports.dir = "target/test-reports/clover"

 

------------------------------

grails v.2.4.3

clover plugin v4.4.0

jenkins v1.596.x

compile "test-app --stacktrace -coverage -clover.on -clover.license.path=/private/clover.license"

3 answers

0 vote

Note: the '-coverage' option is from the 'code-coverage' Grails plugin and it is not required to run Clover. I suggest removing it, as the most probably you won't need two code coverage reports.

0 vote

Please run your build with '-verbose' option and look for messages like the following:

[clover-report] Writing HTML report to '<full path>\target\clover\report'
[clover-report] Done. Processed 4 packages in 1115ms (278ms per package).
[clover-report] Writing report to '<full path>\target\clover\report\clover.xml'

and check if locations declared in the 'Publish Clover Coverage Report' section matches with those from a log file.

Hi,
Thanks, I corrected it by enabling it in BuildConfig.groovy file. However it seems I’m running into clover writing report error as indicated in this section of build log?

15:36:31 Clover: Tests ended. Generating reports

15:36:31 Clover: Generating report using custom 'config.reporttask' closure

15:36:31 Error |

15:36:31 Error executing script TestApp: groovy.lang.MissingMethodException: No signature of method: BuildConfig$_run_closure5_closure36.doCall() is applicable for argument types: (org.codehaus.gant.GantBuilder, org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener$1, _Events) values: [org.codehaus.gant.GantBuilder@1b167069, org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener$1@798aed7e, ...]

15:36:31 Possible solutions: doCall(), call(), doCall(java.lang.Object), findAll()

15:36:31 groovy.lang.MissingMethodException: No signature of method: BuildConfig$_run_closure5_closure36.doCall() is applicable for argument types: (org.codehaus.gant.GantBuilder, org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener$1, _Events) values: [org.codehaus.gant.GantBuilder@1b167069, org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener$1@798aed7e, ...]

15:36:31 Possible solutions: doCall(), call(), doCall(java.lang.Object), findAll()

15:36:31  at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)

15:36:31  at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:51)

15:36:31  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)

15:36:31  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)

15:36:31  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)

15:45:29 Error |
15:45:29 Error executing script TestApp: groovy.lang.MissingMethodException: No signature of method: BuildConfig$_run_closure5_closure36.doCall() is applicable for argument types: (org.codehaus.gant.GantBuilder, org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener$1, _Events) values: [org.codehaus.gant.GantBuilder@28207f19, org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener$1@14722a22, ...]
15:45:29 Possible solutions: doCall(), call(), doCall(java.lang.Object), findAll()
15:45:29 Build step 'Build With Grails' changed build result to UNSTABLE
15:45:29 [h2] $ /bin/sh -xe /tmp/hudson289975291603106814.sh
15:45:29 Xvfb stopping
15:45:30 Publishing Clover coverage report...
15:45:30 Clover xml file does not exist in: /scratch/jenkins/workspace/…/target/test-reports/clover called: clover.xml and will not be copied to: /home/…/hudson_home/jobs/…/configurations/axis-migrateDb/false/axis-testType/unit/axis-useDb/h2/builds/2015-04-30_22-42-56/clover.xml
15:45:30 Could not find 'target/test-reports/clover/clover.xml'.  Did you generate the XML report for Clover?
15:45:30 Disconnecting from VPN service.
15:45:30 sudo: no tty present and no askpass program specified
15:45:30 Finished: UNSTABLE

From what I see, you have a custom 'reporttask' closure: Clover: Generating report using custom 'config.reporttask' closure I suspect that you have a typo in it. Could you paste content of this closure, please?

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published Friday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

58 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot