Cypress / Quiz
Session Caching: Login Once, Fight Everywhere
cy.session can erase minutes of redundant logins per run, or serve every test a stale identity if you skip validate. Know its contract cold.
- Difficulty
- Medium
- Format
- Quiz
- Points
- 150
- Estimate
- 9 min
// MISSION BRIEF
Your Mission
cy.session snapshots cookies, localStorage, and sessionStorage under a key and restores them on demand. Used well it is the single biggest speed win in an authenticated suite. Used blind, it caches garbage.
Six questions on the session contract. Speed bonus active.
// FIRST CONTACT
Battle teaser
Exactly what does cy.session cache and restore?
- AThe entire DOM of the logged-in page
- BCookies, localStorage, and sessionStorage across all domains touched during setup
- CServer-side session records in your backend
- DIndexedDB and service-worker caches
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
cypressauthenticatione2e-testingweb