Cypress / Scenario
The Nine-Minute Login Tax
46 specs, each logging in through the UI, 9 minutes of pure typing per pipeline. The cy.session refactor is drafted, and it has two landmines in it.
- Difficulty
- Medium
- Format
- Scenario
- Points
- 150
- Estimate
- 13 min
// MISSION BRIEF
Your Mission
Your team finally measured why the pipeline crawls: every spec walks the login form. A cy.session refactor is on the table, but the draft skips the parts that make session caching safe.
Read the numbers and the draft, then call the shots: the right architecture, the two bugs in the draft, and what session actually caches. Decisions are weighted.
// FIRST CONTACT
Battle teaser
First artifact
Pipeline audit
Is API-login-inside-session the right core architecture?
- APartially: cy.session is right but the login must stay UI-driven inside it
- BYes: cy.request skips all UI cost, cy.session caches the result, and with cacheAcrossSpecs the 9.2 minutes collapses to one login per run, keep exactly one spec that still tests the login form itself
- CNo: every test must log in through the UI or it is not a real e2e test
- DNo: sessions should be shared by exporting cookies to a JSON file
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
cypressauthenticationperformanceweb