Playwright · Middle · Question 2 of 75

Why do many configs set workers: process.env.CI ? 1 : undefined?

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.

Further reading

Problem with a question

Playwright · Middle · question 2

Test yourself

Take the Playwright · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz