Cypress Best Practices Cheat Sheet

Selectors, retries, and fixtures

Last Updated: November 21, 2025

Guidelines

Focus Tip
Selectors Use data-*
Waits Avoid static waits
Fixtures Reset state
Retries Enable retryability

Commands

cy.intercept
Stub requests
cy.fixture
Load test data
cypress open
Run interactive

Tips

Keep tests fast, isolate flake sources, and pin environment variables.

💡 Pro Tip: Use data-* selectors, prefer cy.intercept, and clean fixtures between runs.
← Back to Developer Tools | Browse all categories | View all cheat sheets