Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publish Clover Coverage Report fails

Tags:

php

jenkins

I have all php tools set up for Jenkins php projects. I set up "Publish Clover Coverage Report" for "Post-build actions", that is

Clover report directory - /build/logs
Clover report file name - clover.xml

I can indeed browser /build/logs and see clover.xml. The whole path is -

But when I execute Jenkins job I get following message -

Clover xml file does not exist in: /build/logs called: clover.xml and will not be copied to: /var/lib/jenkins/jobs/php job 1/builds/2012-01-02_01-11-32/clover.xml

Could not find '/build/logs/clover.xml'. Did you generate the XML report for Clover?

Why is Jenkins not able to see my clover.xml file?

like image 475
Tarun Avatar asked Jan 01 '12 20:01

Tarun


1 Answers

If you are using ant as your build tool that jenkins triggers, then in your build.xml you might need to specify arguments for phpunit command. Something like..

<exec executable="phpunit" failonerror="true">
<arg line="--coverage-clover ${basedir}/build/logs/clover.xml
                --coverage-html ${basedir}/build/logs/
                ."/>
        </exec>
like image 75
Artjom Kurapov Avatar answered Sep 21 '22 01:09

Artjom Kurapov