Explore test results
After PhpStorm finishes running your tests, it shows the results in the Run tool window on the Test Runner tab.
The console on the right shows the output of the current test session. It allows you to see the detailed information on the test execution and why your tests failed or were ignored.
The Test Runner toolbar located above the list of test results allows you to show and hide successful and ignored tests, display how much time it took to run each test, export, import, and sort test results.
Next to each test on the Test Runner tab, the IDE displays an icon that marks the test status:
|Test error. This status is assigned to tests that caused an exception from the tested source code.|
|Test failed. If at least one child test fails, all its parent tests are marked as failed.|
In the PHP context, this icon indicates a skipped test.
A test can be skipped in two situations:
|Test in progress.|
|Test passed successfully.|
Test terminated. This status is assigned to tests that were stopped.
If at least one test receives this status, then all unfinished tests and their parent tests are marked as terminated.
To view the execution time for tests, click on the Test Runner toolbar and enable the Show Inline Statistics option.
View results of previous tests
PhpStorm automatically saves results of the last 10 tests. To open the list of recent tests:
Export and import test results
Export test results to a file
Click on the Test Runner toolbar.
Select the format in which you want to save the file: HTML, XML (use this format if you want to import this file later to PhpStorm), or Custom, apply XSL template (click next to this option and select the *.xsl code style definition file).
Specify the name of the output file and its location.
If you want to open the file in your browser after you export it, select the Open exported file in browser checkbox. Click OK.
Import test results
To load a previously exported file, click on the Test Runner toolbar.
In the dialog that opens, select the .xml file with test results and click Open.