From Flaky to Fearless
summary
Flakiness stems from timing, networking, unstable selectors, shared state and external services and costs teams heavily—citing ~60% of failures and a Microsoft estimate of $1.16M/year. Practical fixes include cy.intercept stubs and waits for API status codes, Cypress auto-retries DOM queries and supports cy.clock/cy.tick for time control, use stable data-* attributes and API-based login, reset state in beforeEach, enable or disable test isolation per suite, centralize commands and store secrets in environment files for repeatable, reliable runs.
AI-written summary · about
chapters (15)
- 0:00Introduction and agenda
- 0:43What is a flaky test?
- 1:47Cost and impact of flaky tests
- 2:29Root causes of flakiness
- 3:10Timing issues and solutions
- 4:35Networking delays and API handling
- 5:39Unstable selectors and fixes
- 7:25External dependencies and mocking
- 8:31Shared state and test isolation
- 10:17Investigating and fixing flaky tests
- 11:43Cypress features for reliability
- 13:10Dynamic data and test management
- 14:16Security and environment handling
- 15:19Business impact and collaboration
- 16:22Q&A and summary
