Android Espresso Essential Training
1h 21mBeginner2018-03-20
Authors

Chiu-Ki Chan
Android Developer, Speaker, Teacher
Course details
Testing is essential to delivering high-quality software. Espresso is the tool of choice for many Android developers, who need to test the logic and UI of their applications. Join instructor Chiu-Ki Chan to learn the essentials of Android Espresso for UI testing. Learn how to write tests by hand, and then leverage the Espresso Test Recorder to record actions that generate the code for you. Find out how to use the Layout Inspector to pinpoint the views you want to test, and also test scrolling views such as list and recycler views.
Learning objectives
Advantages of Espresso and automated testing
Synchronization
Adding Espresso to an Android project
Creating your first test
Recording actions in the Test Recorder
Pinpointing a view
Testing list views
Testing recycler views
Learning objectives
Advantages of Espresso and automated testing
Synchronization
Adding Espresso to an Android project
Creating your first test
Recording actions in the Test Recorder
Pinpointing a view
Testing list views
Testing recycler views
Skills covered
Android DevelopmentAndroidMobile DevelopmentGoogleEssential Training
Concepts
0. Introduction
- 01 - Welcome
- 02 - What you should know
- 03 - Exercise files
1. What Is Espresso
- 04 - Automated testing
- 05 - Types of Android tests
- 06 - How Espresso works
- 07 - Advantages of Espresso
- 08 - Synchronization - Message queue
- 09 - Synchronization - Async tasks
2. Your First Espresso Test
- 10 - App - Hello World
- 11 - Adding Espresso to your project
- 12 - Turn off animations
- 13 - ActivityTestRule
- 14 - The Espresso formula
- 15 - ViewMatcher
- 16 - ViewAction
- 17 - ViewAssertion
- 18 - String value vs. string id
- 19 - Why not findViewById
- 20 - Fluent API
- 21 - Hamcrest matcher
3. Espresso Test Recorder
- 22 - Write tests automatically
- 23 - Record actions
- 24 - Add assertions
- 25 - Generated code
4. Pinpointing a View
- 26 - App - Toolbar Title
- 27 - Layout Inspector
- 28 - Combining matchers
- 29 - Pitfall to overspecification
- 30 - Custom matcher - matchesSafely
- 31 - Custom matcher - describeTo
- 32 - Using withToolbarTitle
5. List View
- 33 - onView vs. onData
- 34 - App - List view
- 35 - withValue matcher
- 36 - onData
- 37 - Failing test
6. Recycler View
- 38 - App - Recycler view
- 39 - Cannot use onData
- 40 - MainActivityTest
- 41 - RecyclerViewActions
- 42 - Other recycler view actions
- 43 - Wrap up
Conclusion
- 44 - Next steps