Using Clover for PHP

Using Clover for other programming languages

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Clover does not support PHP language. However, there is a PHPUnit framework which can measure code coverage for PHP application and to export coverage data to the Clover's XML report file format.

 

Just use --coverage-clover toggle, for example:

phpunit --log-junit 'reports/unitreport.xml' --coverage-clover 'reports/clover.xml' test/

 

Such XML file can be later used by Bamboo Clover Plugin to display code statistics on a Job Summary page and graphs on a Plan Summary page. In order to achieve this, you have to configure manual Clover integration in Bamboo, pointing to the XML file generated by PHPUnit. See Enabling Clover for Bamboo for details.

 

There is also a similar plug-in available for Jenkins - see Clover PHP Plugin page.

 

Note: PHPUnit has also an option to produce the HTML report, but this is not a report in Clover's HTML format.

phpunit --log-junit 'reports/unitreport.xml' --coverage-html 'reports/clover_html' test/

 

A report produced by PHPUnit looks like this:

 

 

References

 

Last modified on Oct 31, 2013

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.