Playwright · Senior · Question 16 of 77

How do you keep HAR-based mocks from going stale?

Show the answer

Correct answer: Re-record them regularly and fail when requests don't match

Explanation

With notFound: 'abort', unmatched requests fail. A scheduled job with update: true refreshes recordings against the real API.

Further reading

Problem with a question

Playwright · Senior · question 16

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