Using Clover for PHP

Using Clover for other programming languages

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

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:

 

 

参考

 

最終更新日: 2013 年 10 月 31 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.