What problem does it solve?
Laravel and Pest test suites often slow down as projects grow, making CI pipelines expensive and local feedback loops painful. This Skill provides a prioritized checklist of proven techniques to find and eliminate the biggest sources of test slowness.
Core Features & Use Cases
- Environment Fixes: Set BCRYPT_ROUNDS=4, disable XDebug and pcov, disable background packages like Pulse and Telescope, and cache config and routes with WithCachedConfig and WithCachedRoutes.
- Faking External Interactions: Apply Notification, Mail, Bus, Event, and Queue fakes, block stray HTTP requests with Http::preventingStrayRequests(), and use Sleep::fake() and Exceptions::fake() to stop real waits and error reporting.
- Database and Factory Optimization: Switch to LazilyRefreshDatabase, audit nested factory create() calls, and reuse parent models with $factory->recycle().
- Use Case: Your CI pipeline takes 20 minutes and individual auth tests take seconds each. Apply the checklist to set BCRYPT_ROUNDS=4, disable XDebug, and run pest --profile to find the slowest tests.
Quick Start
Ask the AI to analyze why my Laravel Pest test suite is slow and apply the recommended optimizations.