Playwright · Middle · Question 2 of 75
Why do many configs set workers: process.env.CI ? 1 : undefined?
- 1Several workers make HTML reports impossible to read
- 2CI machines are often small, and one worker is more stable
- 3Playwright only supports a single worker inside CI
Show the answer
Correct answer: CI machines are often small, and one worker is more stable
Explanation
Locally Playwright uses about half the CPU cores. On a small CI runner, many browsers fight for CPU and cause timeouts. Teams with bigger runners or sharding raise the number.