~/talk

Take a Stab at Test Friendly Architecture

Talkat 360|AnDev 2017 · 2017-07-13..07-14· [android, testing]
links:none on file
slides:none on file

Argument: follow SRP, pick a UI pattern like MVVM, prefer interfaces and explicit constructor dependencies so unit tests use plain constructors and Mockito rather than DI. Tooling: use Dagger2 to inject real or fake implementations for integration tests—author builds a reminder app with a fake reminder store (in-memory) and a test component plus custom test runner; integration tests run with gradlew connectedAndroidTest. Outcome: DI reduces boilerplate, gives compile-time graph checks, and the approach proves practical though Canary Android Studio requires running tests from the command line.

AI-written summary · about

  1. 0:00Intro
  2. 0:24Goals
  3. 1:51Sample Application
  4. 2:15List Screen Dependencies
  5. 3:12Create Screen Dependencies
  6. 5:25UI Architecture Selection
  7. 6:12Sample Architecture
  8. 7:46Bias Towards Interfaces
  9. 8:24Example Refactor
  10. 10:22Implicit Dependencies
  11. 14:44Dagger Recap
  12. 16:44Apply SRP to Dependency Injection
  13. 18:54Injecting Interfaces
  14. 19:41Different Interface Injection
  15. 20:31Perfect Tool For The Job
  16. 24:07Remember This?
  17. 24:20No Need For DI
  18. 25:34Fakes?
  19. 26:17Module For Fake
  20. 26:28Test Component
  21. 27:12Supply Test Application
  22. 27:22Using Custom Test Runner
  23. 27:40Example Integration Test
  24. 28:31Unused Test Runner
  25. 29:44Custom Robolectric Application
  26. 30:47Who is this guy? Brian Gardner @bgardner7
~/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.