Tales of an IT Nobody

devbox:~$ iptables -A OUTPUT -j DROP

PHPUnit and apache ant junitreport task May 13, 2011

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…
No Comments on PHPUnit and apache ant junitreport task
Categories: ant php programming purdy