~/talk

Testing: how hard can it be?

Talkat droidcon Berlin 2022 · 2022-07-06..07-08· [testing]
slides:none on file

Builds a Watch OS SoundCloud client and implements the login flow end to end: Compose screen -> ViewModel with coroutines -> wear client callback wrapped as suspend -> Retrofit API using Moshi -> token saved to EncryptedSharedPreferences. Tests cover the flow with a mix of Compose UI unit tests, lightweight real implementations (in‑memory/sharedprefs) and mocked endpoints, use Robolectric for Android APIs and JUnit5, and include JSON fixtures in test resources. Tests survive a full architecture rewrite and catch parsing and integration issues early while keeping most checks fast and JVM‑bound.

AI-written summary · about

  1. 0:00Introduction to testing
  2. 3:14Testing on Android is broken
  3. 5:45Starting the login feature
  4. 7:07Writing the first test
  5. 10:00Implementing login flow
  6. 13:10Testing the API client
  7. 17:21Saving tokens securely
  8. 19:47Testing Wear OS client
  9. 22:57Refactoring to repository pattern
  10. 24:46Testing JSON parsing
  11. 25:48UI testing with Compose
  12. 28:14Rethinking unit testing
  13. 32:56Testing pyramid revisited
  14. 34:22Summary and final thoughts
~/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.