Question

Is there a way to get Phing to output it's coverage report in clover format?

I know phpunit has --coverage-clover but I don't know how to enable this option from Phing.

I do not want to manually use the <exec command - it defeats the point of Phing.

I am using Phing 2.4RC2

Thanks.

Was it helpful?

Solution

I did some research and Phing doesn't support Clover coverage, you have to use exec.

Here is my exec command:

<exec command="phpunit --bootstrap=${project}/test/bootstrap.php --log-junit ${report}/logfile.xml --coverage-clover ${report}/coverage/clover.xml --coverage-source ${report}/coverage --coverage-html ${report}/coverage-html/ ${project}test/*"/>

OTHER TIPS

Phing supports output to clover format from version 2.4, see http://www.phing.info/docs/stable/hlhtml/index.html#d5e12507

<phpunit codecoverage="true">
    <formatter type="clover" outfile="clover.xml"/>
    <!-- ... -->
</phpunit>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top