Cypress · Middle · Question 73 of 77
When does it make sense to use cy.request for a whole test instead of the UI?
- 1When testing API behaviour, not the user interface
- 2Never; Cypress tests must always use the UI
- 3When the UI test is already passing reliably
Show the answer
Correct answer: When testing API behaviour, not the user interface
Explanation
Cypress can test APIs directly. For larger API suites, a dedicated API testing tool may fit better.