Cypress · Junior · Question 35 of 75

What does cy.session() do?

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.

Further reading

Problem with a question

Cypress · Junior · question 35

Test yourself

Take the Cypress · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz