~/talk

What makes good unit tests for Android apps

TalkinJapaneseat DroidKaigi 2023 · 2023-09-14..09-16· [testing, developer-experience]
links:none on file
slides:none on file

Explains how to make Android unit tests fast, reliable and maintainable by splitting logic into pure JVM tests, using Robolectric for framework-dependent code when appropriate and instrumentation tests only when necessary. Compares Mockito-style stubs, spies and fakes (noting they can speed tests but increase upkeep), measures runtimes (Robolectric ~1s startup; instrumentation slower), and recommends patterns like humble objects and test data builders to avoid flakiness and hidden failures (example: a stubbed repository masking an ItemNotFoundException change).

AI-written summary · about

  1. 0:00Introduction
  2. 5:176 traits of good unit tests
  3. 7:49Android test environment
  4. 12:54Test doubles trade-offs
  5. 21:44When to use test doubles
  6. 27:45Test design for reproducibility
  7. 31:15Fast feedback techniques
  8. 34:02Humble objects summary
  9. 36:50Regression detection reliability
  10. 38:15Minimizing false positives
  11. 39:19Maintainable readable tests
  12. 43:33Summary
~/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.