How Espresso Works
summary
Explains Espresso 3.0 internals: matchers use Hamcrest, onView builds a Dagger 2-backed ViewInteraction with a UIController and ViewFinder, and calling onView alone does nothing so always follow with check or perform. Espresso waits by looping the main thread and reflectively dispatching queued messages until idling resources (registered via IdlingRegistry) and async tasks are idle, avoiding sleeps; ActivityTestRule launches activities via Instrumentation with a background-thread timeout (~45s).
AI-written summary · about
chapters (7)
- 0:00Introduction to Espresso
- 1:37Breaking down Espresso assertions
- 6:33How onView creates ViewInteraction
- 10:54How check executes on UI thread
- 22:31Finding views in view hierarchy
- 26:00View assertions and matchers
- 30:38Launching activities in tests
related talks
57mHow Espresso Works
38mEspresso, beyond the basics
44mDrink Espresso during Android Testing
01h 29mHello Espresso! Start with Android Gray box automation
26mEspresso Patronum - The Magic Of The Robot Pattern
43mUnlocking New Testing Capabilities with Espresso Driver
53mSolving Espresso Android Autotest Issues in the Real World
42mRock-Solid UI and Instrumentation Testing
