What must be true before a test suite can run safely in parallel?
Answer
Tests need isolated users, data and resources, deterministic setup and teardown, no ordering dependency and enough environment capacity. Parallelism should be bounded by the slowest shared dependency and preserve debuggable artifacts per worker.
Strong answer includes
- data and resource isolation
- capacity awareness
- per-worker diagnostics
Practical example
Two tests running in parallel both use a hardcoded 'testuser@example.com' account and start failing intermittently as they race to modify the same user's profile; switching to dynamically generated unique users per test worker fixes the flakiness immediately and lets the suite scale to more parallel workers.