Cypress · Senior · Question 14 of 76
How can fixtures be kept in sync with the real API?
- 1Copy production responses once and never update them
- 2Generate or validate them against the schema or contracts
- 3Edit them by hand only when a test happens to fail
Show the answer
Correct answer: Generate or validate them against the schema or contracts
Explanation
Schema validation in CI fails when a fixture no longer matches the API, before UI tests silently test a fiction.