Playwright · Senior · Question 66 of 77

How do you make sure tests don't depend on run order?

Show the answer

Correct answer: Run with fullyParallel and random sharding regularly

Explanation

If tests only pass in one order, they share state. Running them in parallel and in different groupings exposes that.

Further reading

Problem with a question

Playwright · Senior · question 66

Test yourself

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

Take this quiz