Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate PHPUnit Report(Failed and Passed Tests)

I would like to know how to generate a phpunit report which tells what tests failed and what tests passed. Any configuration in the phpunit.xml? I couldn't find any information than php coverage report.

I would something like the image below (generated by junit)

enter image description here

Thanks

like image 680
dextervip Avatar asked Dec 05 '11 22:12

dextervip


1 Answers

You can create pretty much every output format you want from the the junit.xml logfile. An example for doing it yourself can be found here, here is a table and here is a little more on the subject.

If you want something small for multi project there is "sismo", a very minimal CI server that runs all of your local projects so that you always know their status. Check the symfony project page for details

Usually, as most people don't need/want this reporting locally and want to see a little more, this isn't done locally and a full blown Continuous Integration server like Jenkins is used Demo. It can show you all the information that PHPUnit can provide and much more. Check my setup guide to see that installation isn't hard.


Update:

Also see: SO: Web interface to phpunittests and from there the Visual PHPUnit tool.

like image 124
edorian Avatar answered Sep 21 '22 16:09

edorian