Playwright · Senior · Question 15 of 77

Mocking all APIs makes E2E tests fast. What is the main risk?

Show the answer

Correct answer: Tests pass while the frontend and real backend disagree

Explanation

Mocked tests check the UI against your assumptions. Keep some tests against a real backend, or add contract tests to catch drift.

Further reading

Problem with a question

Playwright · Senior · question 15

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