Speed Up Your CI with phpunit-slow-test-detector to Find Slow Tests
TL;DR: Use ergebnis/phpunit-slow-test-detector to surface your slow PHPUnit tests, then use that as a metric for parallelizing or splitting your test jobs. ergebnis/phpunit-slow-test-detector: A PHPUnit extension that detects and reports slow tests exceeding a configured threshold The “which tests are slowing down CI?” problem Your CI tests are slow. They keep getting slower, and waiting after every push gets old fast. But when you actually try to speed things up, you can see that “the whole thing takes 5 minutes” — yet “okay, but which tests are dragging it down?” doesn’t jump out at you. You might have a vague hunch that “the tests touching the DB are probably the suspects,” but you haven’t actually measured anything. ...