Publish Clover Coverage Report

I have all the php tools created for Jenkins php projects. I set the "Publish Clover Coverage Report" to "Post-Build Action", i.e.

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

I can really use the browser / build / logs and see clover.xml. All the way -

But when I do the work of Jenkins, I get the 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'. Have you created an XML report for Clover?

Why can't Jenkins see my clover.xml file?

+6
source share
1 answer

If you use ant as the build tool that runs jenkins, then in your build.xml file you may need to specify arguments for the phpunit command. Sort of..

 <exec executable="phpunit" failonerror="true"> <arg line="--coverage-clover ${basedir}/build/logs/clover.xml --coverage-html ${basedir}/build/logs/ ."/> </exec> 
+7
source

Source: https://habr.com/ru/post/904850/


All Articles