~/talk

Effective Unit Testing

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

Focuses on concrete rules and tradeoffs for Java/JUnit: require known fixed input and output, prefer write tests first to design APIs and catch bugs early, and aim for one assert per test and tests that run in about 1s or less. Cites a codebase at ~70% test coverage (JaCoCo) and an independent library zom at 99% coverage as examples. Warns against flakiness from time, network, randomness, and threading, and recommends CI/submit-queue and never merging when tests fail.

AI-written summary · about

  1. 0:00Intro
  2. 1:45Why do we write unit tests?
  3. 7:19Eliminate everything that makes input or output unclear or contingent
  4. 13:57Why Unit Tests?
  5. 17:33Tests and Thread Safety
  6. 19:17The Two Least Known Facts of Unit Testing
  7. 20:462. You can have many test classes per model class.
  8. 21:17Speed
  9. 24:07Passing tests should produce no output
  10. 25:39Failing tests should produce clear output
  11. 27:16Flakiness
  12. 31:41System Skew
  13. 34:17Avoid Conditional Logic in Tests
  14. 37:02Refactoring
  15. 39:14Development Practices
  16. 41:53Final Thoughts
~/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.