Christoph Rumpel :: Managing 5000+ Tests Efficiently
summary
A Laravel codebase with 5,370 tests and ~20k assertions shrinks from a 50‑minute local run to about 5 minutes on a 10‑core MacBook Pro by profiling with Pest, fixing heavy setup methods and a slow user factory, switching to transactions/MySQL plus a test‑prepare step, introducing parallel testing (parallel hooks and cache key prefixes), splitting CI across GitHub Actions, and planning a dumped SQL schema import to avoid 660 migrations. Issues include flaky parallelism and runner CPU limits.
AI-written summary · about
chapters (9)
- 0:00Zero to 5000 tests
- 5:20Introducing the 5000 test monster
- 7:51GitHub Actions test chunks
- 12:23Finding slow tests with Pest
- 17:30Parallel testing challenges
- 21:50Parallel testing working
- 23:12Optimizing migrations and setup
- 24:35Key takeaways for large suites
- 25:59Q&A
related talks
29mEffective tests and testing effectively
24mSupercharging CI: Test Suite Optimization for Speed, Stability, and Savings
26mKeeping Your Tests Lean
54mTesting in Legacy: From Rags to Riches
45mTesting Legacy Code - What To Do When It Seems Untestable
35mTurning test writing into a consistently brief and pleasant experience
36mLiving peacefully with Laravel
38mTake your slow tests to the doctor
