~/talk

How to (not) write a flaky test

Talkat TestFlix 2024 · 2024-10-19..10-20· [testing, web-platform]
slides:none on file

Defines flakiness as inconsistent test results and pins causes to three growing axes: coverage (DOM and network race conditions), execution (bad isolation and parallelism), and performance (slow infra and tests). Recommends concrete fixes: use Cypress intercept and mock empty array to eliminate network races, add assertions/checkpoints and wait for loader element for DOM determinism, design isolated resources per parallel worker, clean staging data outside tests (cron job), cache browser state/snapshots instead of repeating UI logins, and raise granular timeouts only where needed.

AI-written summary · about

  1. 0:00Introduction to test flakiness
  2. 1:54Three axes of flakiness
  3. 3:17DOM flakiness and solutions
  4. 5:04Network layer flakiness
  5. 6:51Test isolation issues
  6. 8:38Infrastructure problems
  7. 10:44DRY principle in tests
  8. 12:30Test idling and timeouts
  9. 14:40Summary and key takeaways
~/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.