~/talk

Get More From Your Unit Tests

Talkat iOS Conf SG 2022 · 2022-01-20..01-21· [testing]
slides:none on file

Code that’s hard to test gets simplified into a to‑do list, repository protocol and small units; tests verify behavior not internal calls, reducing fragile coupling. Tests use test doubles and the Cuckoo mocking framework to assert save is called with the created item. Tests follow given when then for clarity. A real bug leads to a failing test, a regex change (allowing a period) fixes it and the suite stays green, turning tests into live specs.

AI-written summary · about

  1. 0:00iOS Conf SG 2022 17-21 January
  2. 0:18Why write unit tests?
  3. 0:59Major issues with unit testing in practice
  4. 1:36Code Under Test
  5. 1:58Identify different responsibilities
  6. 2:27Break down responsibilities
  7. 3:21Add todo source code
  8. 3:35Testing code with external dependencies?
  9. 4:05How to mock?
  10. 4:29Test "add todo"
  11. 5:51Lets say those magical words again
  12. 6:45Test for the "error path"
  13. 7:01Test "remove todo"
  14. 7:38Fragile Test Problem
  15. 8:29Example
  16. 8:49Redundant?
  17. 9:16Solution
  18. 9:42Are these "unit" tests?
  19. 10:15"Unit" ?
  20. 10:36Todo Package
  21. 11:08Not a silver bullet
  22. 11:46References
  23. 12:08Books?
  24. 12:45Tests are not meaningful
  25. 13:05Meaningful Tests
  26. 13:48Product Requirement Doc (PRD)
  27. 14:21What happens when Test = Spec?
  28. 15:43Scenario
  29. 16:11Existing Test
  30. 16:24New failing test
  31. 16:38Update Code
  32. 16:54Test passes!
  33. 17:23Summary
~/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.