Cypress · Senior · Question 16 of 76

What is a pitfall of cy.session without a validate function?

Show the answer

Correct answer: Expired sessions get restored and tests fail later, confusingly

Explanation

Validation (e.g. checking a protected API returns 200) makes Cypress rebuild stale sessions automatically.

Further reading

Problem with a question

Cypress · Senior · question 16

Test yourself

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

Take this quiz