Appearance
date: 2026-06-20 tags: [pest-browser, playwright, testing, web-env, footgun] status: active graduated_to:
Running the pest-browser suite as parallel separate processes hangs
Symptom — Splitting the browser suite across two concurrent php artisan test tests/Browser/… invocations (to save wall-clock) hung: both processes stalled with no output and had to be killed, where a single process running the same tests completes fine.
Root cause — Each pest-browser process stands up its own in-process amphp HTTP server (the app under test) and its own Playwright/Chromium. Run two at once and they contend — same fixed bindings/test-DB sqlite file — so neither makes progress. The suite is built to run as one process; parallelism is the in-process server's enemy here, not its friend.
Fix — Run the browser group in a single process via the project script (COMPOSER_ALLOW_SUPERUSER=1 composer test:browser), or one php artisan test tests/Browser invocation. To go faster, narrow with --filter inside the one process — don't fan out across processes.
Guard — .claude/rules/testing.md notes: never fan the browser group across parallel processes — run composer test:browser (one process), narrow with --filter. (CI's "Browser tests" job already runs it as a single job.)