~/talk

Mocks, Stubs, and Spies, Oh My!

Talkat droidcon San Francisco 2017 · 2017-11-05..11-06· [testing]
links:none on file

Covers five concrete test doubles — mocks, stubs, spies, dummies, fakes — and shows when to use each: mocks verify interactions and use mock(), when(...).thenReturn() style setup; stubs supply responder or sabotur values; spies combine recording plus return values or wrap real objects for side effects; fakes give fast in‑memory substitutes (common for databases) while avoiding overuse that leads to over‑specified fragile tests. Also notes Mockito-style tools can mock finals and that integration tests should avoid mocks.

AI-written summary · about

  1. 0:00Introduction to test doubles
  2. 1:22Why use test doubles
  3. 5:53Types of tests explained
  4. 6:13Mocks explained
  5. 11:04Stubs explained
  6. 14:59Spies explained
  7. 20:00Dummies explained
  8. 22:11Fakes explained
  9. 25:04Common pitfalls with test doubles
  10. 27:31About the speaker
  11. 28:15Q&A session
~/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.