Cypress Data Session

JSON →
library 3.0.0 ·javascript
verified May 27, 2026

cypress-data-session is a Cypress plugin designed to streamline test data setup and reuse by implementing a powerful caching mechanism. It provides the `cy.dataSession` command, allowing developers to define how test data (like user objects, authentication tokens, or complex API responses) is created, validated, cached, and recreated if necessary. This plugin significantly speeds up test execution by avoiding repetitive, expensive data creation operations across multiple tests or even different spec files. Currently at v3.0.0, the package sees consistent maintenance and bug fixes, with major versions introducing breaking changes tied to Cypress core updates. Its key differentiator from Cypress's native `cy.session` command is its flexibility: `cy.dataSession` can cache *anything* (not just browser session state), provides direct access to cached data, supports custom validation logic, dependent caching, time limits, use count limits, and offers static utility methods, making it highly adaptable for complex test scenarios.

total hits 22
actors 7 distinct systems
last hit 1d ago human
ByteDance
9
MetaBot
4
GPTBot
2
Script
1
Search engines
2
Humans
1

top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇨🇦 Canada · 🇳🇱 Netherlands · 🇫🇷 France