Playwright · Senior · Question 10 of 77
How would you design fixtures for a pool of test accounts in parallel runs?
- 1A new account created by hand before each CI run
- 2One shared global account used by all tests at once
- 3Worker-scoped fixture that gives each worker its own account
Show the answer
Correct answer: Worker-scoped fixture that gives each worker its own account
Explanation
Each worker gets an account by workerIndex or creates one at start, so tests in different workers never fight over the same data.