Integrate code coverage report (clover format, PHPUnit)

I'm using TeamCity for PHP projects and it means that it use some PHP tools in during build process: one of them is PHPUnit, so it generates it's own HTML Code Coverage which is integrated as custom report tab but I'm intrested in integration xml report which is in clover format. Is it possible? Except this one colution:

Comment actions Permalink


In TeamCity you can add your own statistic values and configure UI to display charts for them. See more at custom charts.
I'd try to use service message to report values with predefined names (the a table on the first link).

BTW, can you share your experience with PHPUnit usage in TeamCity? We have a feature request on this but so far it is not clear what specifically should be added to TeamCity in this regard.

Comment actions Permalink
  1. Ya, custom charts could help but it will take more time then create XSLT to map existing XML (in "clover" format ) report to one of supported formats (if the are xml based, I didn't work with IDEA / EMMA code coverage yet, are they xml based? But I still could not get an example of suppurted formats).
  2. About PHPUnit please take a look at this recent topic (I hope you know Russian). PHPUnit and other PHP related tools are easily (after reading MANs and understanding how TC works with 3rd parties) integrated using TC's service messages and could be implemented by user in his build script (I mean XML for Apache Ant as example): (build.xml) (phpunit.xml) - See rows 17-31, and then just need to set up Report Tabs to use published artifacts. So possible you have just to add an description how to use existing features to integreate PHPUnit and etc.

Feel free to contact me to get some more info.


Please sign in to leave a comment.