~/talk

How to write a flaky test

Talkat CypressConf 2024 · 2024-10-22..10-23· [testing]
slides:none on file

Concrete fixes for flaky tests: use Cypress intercept and wait to mock or synchronise API responses and assert loader/state checkpoints, isolate test data per parallel worker and run cleanup jobs outside tests, prefer browser-state caching with cy.session to avoid repeated UI logins (example cuts suites from 15h to 4h), avoid heavy abstraction that hides what tests do, remove hard waits and instead wait for specific network calls or elements, and monitor CI/staging performance so slow infra doesn’t induce flakiness.

AI-written summary · about

  1. 0:00Introduction
  2. 1:26What is test flakiness
  3. 4:57Why flakiness happens
  4. 6:43Flakiness from test coverage
  5. 9:30Network-related flakiness
  6. 12:23Execution and isolation issues
  7. 15:36Infrastructure problems
  8. 19:14Test performance and DRY
  9. 23:48Avoiding test idling
  10. 26:38Summary and key takeaways
  11. 27:20Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.