~/talk

Writing a truly testable code

Talkat GDG DevFest Minsk 2016 · on Friday, 2016-11-25· [testing, android]
links:none on file
slides:none on file

Argues that testability requires removing implicit inputs and outputs and passing everything through explicit APIs and DI, using Android, MVP, Kotlin, Rx and Dagger 2 as concrete examples. Shows failures: flaky Rx tests that fail on fast machines because schedulers are implicit and locale/time formatting tests that break across timezones. Describes the fix of injecting schedulers and time providers, using header interfaces and mocks, and a short-lived hack that forced tests onto a slow CI before the real make time an injected dependency fix. Also proposes wrap platform APIs and build up the dependency graph from leaf modules.

AI-written summary · about

  1. 0:00Introduction and thanks
  2. 3:16Why write tests
  3. 6:07Truly testable code definition
  4. 13:08Explicit inputs and outputs
  5. 16:54Time as a dependency
  6. 18:21Schedulers in testing
  7. 22:12Locale and formatting issues
  8. 24:43Abstracting platform dependencies
  9. 29:28Mocking dependencies
  10. 31:36Refactoring for testability
  11. 35:17Summary and closing
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.