PHPUnit and apache ant junitreport task

There’s not a whole lot of ‘purdy’ interfaces for parsing junit results. For what little that’s out there – it’s even a bit more difficult when you consider the PHP camp looking for a parser for the output from the likes of PHPUnit

If you’re looking for an easy way out with a reasonable result on the unit test report – take a look at my quick and dirty conversion script.
Basically, the default output from PHPUnit’s –log-junit argument doesn’t jive 100% with ant’s junitreport task. This is due to the nested ‘testsuite’ elements in the results. All the script does is flatten those into several files, something the junitreport task expects.
Take a look, maybe it’ll help someone besides myself. 
Someday I may get around to writing a straight up php parser to deal with either the junit xml or the json output from phpunit… maybe…

Leave a Reply

Your email address will not be published. Required fields are marked *