~/talk

Espresso Patronum - The Magic Of The Robot Pattern

Talkat droidcon London 2019 · 2019-10-24..10-25· [testing, android]
slides:none on file

Shows how using the robot pattern with Espresso turns long nested onView calls into a small set of screen-specific helpers, e.g. enterFirstName() and assertEmailDisplay(), for a registration form (first/last/email/phone/opt‑in). Implements view matchers in a companion object, one method per action/assertion, per‑screen robots, and a unit‑test robot for a ViewModel; changing LiveData to a BehaviorSubject requires one robot edit and all tests still pass. Includes screenshot logging and a GitHub repo with working samples.

AI-written summary · about

  1. 0:00Introduction to Robot Pattern
  2. 3:12Espresso Basics and Problems
  3. 7:25Separation of Concerns Issues
  4. 9:09Introducing the Robot Pattern
  5. 13:21Building the Registration Robot
  6. 15:07Best Practices for Robots
  7. 18:20Robot Pattern Beyond UI Tests
  8. 21:36Unit Test Robot Example
  9. 23:21Real-World Robot Maintenance
  10. 24:45Key Takeaways and Recap
~/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.