~/talk

Mocks, Stubs, and Spies, Oh My

Talkat droidCon NYC 2018 · 2018-08-27..08-28· [testing]
links:none on file
slides:none on file

Defines five test doubles with concrete rules: use mocks to record calls and verify indirect outputs, prefer lenient over strict mocks to avoid brittle order checks; use stubs to supply indirect inputs including responder and sabotuer behaviors; use spies to wrap real implementations and inspect internal state; use fakes as in-memory replacements (fast DB substitute) for integration tests. Calls out Mockito as the mocking tool that blurs terms and warns that overusing doubles makes tests overspecified and fragile.

AI-written summary · about

  1. 0:00Introduction to test doubles
  2. 1:08Test pyramid overview
  3. 3:35When to use test doubles
  4. 4:59Mocks explained
  5. 7:26Mocks in unit tests
  6. 9:09Stubs and their role
  7. 11:56Stubs in testing
  8. 13:01Spies as test doubles
  9. 15:29Dummies in testing
  10. 16:55Fakes for performance
  11. 20:08Terminology confusion
  12. 23:17Mockito’s test doubles
  13. 25:50Best practices for test doubles
  14. 27:36Overusing test doubles
  15. 28:39About the speaker
~/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.