~/talk

Unit Test Craftsmanship

Talkat Agile Singapore Conference 2016 · on Monday, 2016-10-17· [testing]
slides:none on file

Shows how a messy invoicing unit test with buried setup and ten-plus asserts gets refactored into a few clear lines that read like behavior: invoice line-item DSL, create anonymous fixtures for irrelevant data, and assert on a single expected object. Uses xUnit-style frameworks, IDE extract-method refactorings, and TDD for the small custom assertions that are themselves testable. Demonstrates duplicating-product and multi-product cases and cuts repetitive tests from ~20 lines to about five.

AI-written summary · about

  1. 0:00Start
  2. 1:15What Does it Take To be Successful?
  3. 5:21Economics of Maintainability
  4. 9:18Use Better Assertion
  5. 12:18Hard-Coded Test Data
  6. 13:25Creation Method
  7. 14:11Remove Irrelevant Information
  8. 15:31Introduce Custom Assertion
  9. 16:50Four-Phase Test
  10. 20:29Improving Terminology
  11. 21:55Test Coverage
  12. 24:06Rapid Test Writing
  13. 27:29Removing Deodorant
  14. 27:49Benefits
  15. 30:09Reducing the Need to Refactor Tests
  16. 32:49Closing 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.