~/talk

10 simple rules for writing great testcases

Talkat Devoxx US 2017 · 2017-03-21..03-23· [testing, developer-experience]
slides:none on file

Ten concrete rules for reliable tests: write tests that document actual behaviour, keep each test small and single‑purpose, use frameworks like JUnit and mocks to make tests fast and isolated, and design diagnostics so failures point to the failing line. Track and fix flaky tests because intermittent failures create a noise floor (OpenJDK aims for ~2 hours for full CI). Avoid modifying the system under test and avoid hard‑coding paths or ports; cloud and containers amplify nondeterminism, so keep test output minimal and useful.

AI-written summary · about

  1. 0:00Introduction
  2. 0:34About Steve Poole
  3. 1:08About Stuart Marks
  4. 1:42How many people write code
  5. 1:59What to say
  6. 2:41Why write tests
  7. 3:12Make changes
  8. 3:36TDD exercise
  9. 4:16Rules
  10. 4:45Think before you act
  11. 7:01Testing and quality
  12. 9:00Writing more tests
  13. 9:11Make your tests understandable
  14. 10:16What happens if your test code is not well maintained
  15. 11:46Keep your tests small and simple
  16. 12:42Structure your tests
  17. 13:16One operation one test scenario
  18. 15:00Test cases with 100 assert
  19. 16:41Fast test only
  20. 16:53Test speed
  21. 18:36Feedback loop
  22. 19:59Test run fast
  23. 20:31Test run long
  24. 21:42OpenJDK
  25. 28:45Cloud
  26. 31:49Independent tests
  27. 33:54Dual tests
  28. 36:27Test storage
  29. 37:04Test line failure
  30. 39:54Steves story
  31. 42:49No hard coding
  32. 45:29Hard coding
  33. 46:49No extraneous output
  34. 47:44Test logs
  35. 49:19Wrapping up
  36. 50:44Giveaway
~/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.