~/talk

Mocks vs Fakes vs Stubs

Talkat GDG DevFest Sofia 2019 · on Saturday, 2019-10-05· [testing]
links:none on file
slides:none on file

Argues that heavy use of Mockito encourages tests that mirror implementation and break on refactor, and demonstrates replacing mocked views with a fake view that records UI state so tests assert outcomes not interactions. Shows a simple Android MVP example where three tests (success, loading, error) shrink and stabilize when using fakes and shared fake state, recommends a small factory objects pattern for test data, and promotes ping‑pong and intentional code mutation to validate test quality.

AI-written summary · about

  1. 0:00Introduction
  2. 1:15Why write unit tests
  3. 14:08Test Quality
  4. 14:48Test Implementation
  5. 15:58Fakes
  6. 16:35Test View
  7. 19:22Use Cases
  8. 21:35Data Class
  9. 23:35Unit vs Class
  10. 25:32The preferred solution
  11. 27:38Unit testing
  12. 31:26Refactoring
  13. 33:45UI test
  14. 35:45Integration test
  15. 38:15Account state
~/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.