~/talk

How to Really Test an Android Application

TalkinFrenchat Droidcon Paris 2015 · 2015-11-09..11-10· [android, testing]
links:none on file
links:none on file
slides:none on file

Shows how to make legacy Android code testable by refactoring: wrap static calls (e.g., in a ProfileManager), convert singletons to instances, and replace deep inheritance with composition using small view-manager and messenger components so Activities handle only UI wiring and Presenters hold business logic. Demonstrates testing tools and techniques: Mockito (PowerMock only when unavoidable), Robolectric or instrumentation tests for state, JUnit parameterized tests and Rules, and Hamcrest/AssertJ for readable assertions, reporting increased coverage and better edge-case detection while noting some later brittle approaches.

AI-written summary · about

  1. 0:00Android test strategy
  2. 4:21Static methods testing
  3. 10:41Singletons testable
  4. 12:04Inheritance to composition
  5. 17:42MVP model separation
  6. 22:45Readable unit tests
  7. 28:05Advanced testing tools
  8. 33:00Assertion visibility
  9. 39:26Maintainable test practices
  10. 40:07Conclusion
~/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.