Cypress · Junior · Question 35 of 75
What does cy.session() do?
- 1Starts a new browser for each test session
- 2Caches and restores cookies and storage for a login
- 3Shows how long each test session lasted
Show the answer
Correct answer: Caches and restores cookies and storage for a login
Explanation
The setup runs once per session ID; later tests restore the saved state, which speeds up suites a lot.