Child pages
  • Clover PHP Plugin

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wiki Markup
{jenkins-plugin-info:pluginId=cloverphp|jiraComponent=cloverphp-plugin}
Excerpt

This plugin allows you to capture code coverage reports from PHPUnit. For more information on how to set up PHP projects with Jenkins have a look at the Template for Jenkins Jobs for PHP Projects.

...

You have to use "--coverage-clover" option to generate clover style coverage report.
The following setting is for Phing.

Code Block
titlebuild.xml

<exec dir="."
      command="phpunit --log-junit 'reports/unitreport.xml'
                       --coverage-html 'reports/coverage'
                       --coverage-clover 'reports/coverage/coverage.xml'
                       test/"
/>

...

Code Block
titlebuild.xml with phpunit task

<phpunit codecoverage="true" haltonfailure="true" haltonerror="true">
  <formatter type="clover" usefile="false"/>
  <batchtest>
    <fileset dir="tests">
      <include name="**/*Test*.php"/>
    </fileset>
  </batchtest>
</phpunit>

...

  • the location of clover xml(required).
  • the location of clover html report (optional).

Project screen

TODO

  • Make compatible with pipelines

Changelog

0.5 (20 Nov, 2015)

0.4 (6 Apr, 2015)

  • support variables for configuration.
  • option to generate clover report regardless of build (JENKINS-21046).
  • The CloverPHP red/green coverage bar is too wide (JENKINS-25717).

...