~/talk

Unit Test Your Views

Talkat droidcon Italy 2020 · 2020-11-27..11-28· [testing, developer-experience]
links:none on file
slides:none on file

Asserts that views can be unit tested on the JVM without instrumentation by building a tiny team‑ranking (tea) app and exercising UI logic with Robolectric and ActivityScenario and FragmentScenario while replacing dependencies via Koin injection. Tests mock the ViewModel, verify that the FAB click invokes addButtonClick, check that LiveData navigation events emit and that fragments and activities launch cleanly, and report that the approach works reliably and runs fast.

AI-written summary · about

  1. 0:00Start
  2. 1:58What Brings People to Unit Testing
  3. 5:44Agenda
  4. 6:42Introduction
  5. 11:26Testing Pyramid
  6. 12:53Acceptance Tests
  7. 17:14Unit Testing
  8. 28:35Testing the Viewmodel Instead of the Model
  9. 30:53Outputs
  10. 31:49View Mode
  11. 32:38Trigger Navigation
  12. 46:37Navigation Controller
~/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.