PHPUnit
PHPUnit is a testing framework for Php.
Enabling XML Output
PHPUnit can be configured to produce JUnit XML output by adding the --log-junit
argument to your command line. ex:
will produce XML output in the output.xml
file.
Test Suite Naming
By default PHPUnit use the name of your PHP files as the name
attribute of the output XML. For example, this test code
will produce XML output that looks like this:
Further Information
See an example of PHPUnit invoked from a GitHub action here.
Last updated