The real face of functional testing
summary
Shows concrete test patterns for a real production app that queries the GitHub API and uses location and social logins, replacing network and GPS with test modules that return a prepared Observable<User> and a fixed location. Uses Espresso for UI interactions, Dagger 2 to swap modules, and Retrofit + RxJava for async stubs. Demonstrates replacing Facebook login with a test button, a 10s sleep workaround for flakiness, pressing back six times to tear down activities, and running on Travis CI for CI validation.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:52What is Espresso
- 3:44Abstracting test code
- 5:33Testing REST clients
- 8:05Mocking GPS and services
- 9:29Testing third-party login
- 11:15Demo app overview
- 13:45First functional test
- 19:05Debugging failing test
- 21:13Test modules for speed
- 27:01Testing error conditions
- 29:50Espresso pitfalls
- 31:41Custom matchers
- 32:43Key takeaways
- 34:13Closing remarks
related talks
36mTesting: how hard can it be?
42mRock-Solid UI and Instrumentation Testing
35mModern Testing on Android
42mBuild testable apps for Android
35mTesting Android Apps Based on Dagger and RxJava
53mSolving Espresso Android Autotest Issues in the Real World
24mLet's Get Functional? Seriously!
39mPractical TDD for Android
