~/talk

Fixing Flaky Tests Like a Detective

Talkat RailsConf 2019 · 2019-05-01..05-03· [testing]
links:none on file
slides:none on file

Describes a concrete debugging recipe: gather CI failures into a bug tracker, classify flakes into the five usual suspects—async code (Capybara, have_content, save_screenshot), order dependency (DatabaseCleaner, RSpec bisect and randomized runs), time issues (Timecop or Timecop.travel), unordered collections, and randomness (use explicit values not Faker, control Kernel.srand). Shows fixes and replication techniques, recommends assigning owners, logging extra state, and tracking a target pass rate (example target: 90% master build pass rate).

AI-written summary · about

  1. 0:00Fixing Flaky Tests Like a Detective
  2. 4:37Types of Evidence
  3. 7:06Async code in system/feature tests
  4. 9:45Another example: async code
  5. 11:17Identifying async code flakes
  6. 12:20Preventing async flakes
  7. 14:05Potential areas of shared state
  8. 14:28Database cleaning
  9. 16:47Know your database cleaner
  10. 17:17Example: order dependency
  11. 18:25Other sources of order dependency
  12. 19:16Identifying order dependency
  13. 20:13Preventing order dependency
  14. 20:58Example: Time
  15. 22:40Identifying time-based flakes
  16. 23:09Preventing time flakes
  17. 24:25Example: Unordered Collections
  18. 25:55Example: Randomness
  19. 27:07Identifying randomness-based
  20. 27:47Preventing randomness based
  21. 28:28Strategy tips
  22. 29:55If you're stuck
  23. 33:37Fixing flaky tests as a team
~/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.