Playwright · Senior · Question 41 of 77

How do you clean up data created by E2E tests?

Show the answer

Correct answer: Teardown in fixtures, plus a periodic job for leftovers

Explanation

Fixtures delete what they created even on failure. Crashed runs still leave data, so a scheduled cleanup by prefix helps.

Further reading

Problem with a question

Playwright · Senior · question 41

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