Can we save the result of PHPUnit test

Is it possible to save the result generated from a PHPUnit test as a text file or as a html file so that we can review it later and send it to concerned person through email? Simply my requirement is to save the out put,that we get in an IDE (Netbean or Eclipse) or in the command prompt into a file in the local system(the system where i perform the test) . after searching a long i did not find a required solution. if anybody has a solution please help me.


PHPUnit offers three command-line options for saving results to a file also:

phpunit --log-junit results.xml test.php - saves results of test.php as XML file results.xml

phpunit --log-tap - will save as TAP

phpunit --log-json - will save as JSON


if you're using the command prompt on unix, couldn't you just use the > to redirect the output to a text file?

phpunit ArrayTest > MyArrayTestOutput.txt

Most IDEs will also let you copy/paste the output of their buffer/terminal to wherever your heart desires.