PHPUnit offers three command line options for saving results to a file:
phpunit --log-junit results.xml test.php - saves test.php results as an XML file results.xml
phpunit --log-tap - will be saved as TAP
phpunit --log-json - will be saved as JSON
ivete source share