I’m using phpunit for testing and I really need html reports in HTML format.
Please show me the simplest way or code example.
Build in phpunit you can generate a report in HTML using the
--testdox-html <output file> option. The output is very rudimentary.
Alternatively you can generate the junit xml output using the
--log-junit <output file> option and transform the xml output to html with an xsl-script, e.g. the one from phing (you will need
str.replace.function.xsl) using an xsltprocessor like xsltproc. This will give a little bit more information.
For the ultimate power there are frontends for phpunit which displays the test results in the browser as HTML, this could be worth a look as well: