How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

How to save and restore state in Cypress tests

calendar_today January 1, 2001 domain reflect

Best Practices on Sharing State Sharing state across multiple tests is considered a bad practice. Consider the following passage from Cypress’s “Best Practices” docs : You only need to do one thing to know whether you’ve coupled your tests incorrectly, or if one test is relying on the state of a previous one. Change it to it.only on the test and refresh the browser.

open_in_new Read original post