Alternate implementation for #64. Thanks @PeterDKC for proposing this idea.
Some test suites run for a long time. PHPUnit already supports command-line options for halting execution when different test result types are first encountered. This allows more quickly notifying developers about problems in the test suite.
--stop-on-error
--stop-on-failure
--stop-on-warning
--stop-on-risky
--stop-on-skipped
--stop-on-incomplete
This PR proposes a new SpeedTrap option stopOnSlow to stop execution upon the first slow test.
The option is controlled using phpunit.xml like other SpeedTrap options:
<phpunit bootstrap="vendor/autoload.php">
<!-- ... other suite configuration here ... -->
<listeners>
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener">
<arguments>
<array>
...
<element key="stopOnSlow">
<boolean>false</boolean>
</element>
</array>
</arguments>
</listener>
</listeners>
</phpunit>
What does it look like when the test suite halts due to a slow test?
The slowness report displays with the single slow test, followed by PHPUnit's normal test runner report.
Alternate implementation for #64. Thanks @PeterDKC for proposing this idea.
Some test suites run for a long time. PHPUnit already supports command-line options for halting execution when different test result types are first encountered. This allows more quickly notifying developers about problems in the test suite.
This PR proposes a new SpeedTrap option
stopOnSlow
to stop execution upon the first slow test.The option is controlled using
phpunit.xml
like other SpeedTrap options:What does it look like when the test suite halts due to a slow test?
The slowness report displays with the single slow test, followed by PHPUnit's normal test runner report.