Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Android Espresso Essential Training

via LinkedIn Learning

Overview

Learn how to perform UI testing of your Android applications with Espresso.

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.

Syllabus

Introduction
  • Welcome
  • What you should know
  • Exercise files
1. What Is Espresso?
  • Automated testing
  • Types of Android tests
  • How Espresso works
  • Advantages of Espresso
  • Synchronization: Message queue
  • Synchronization: Async tasks
2. Your First Espresso Test
  • App: Hello World
  • Adding Espresso to your project
  • Turn off animations
  • ActivityTestRule
  • The Espresso formula
  • ViewMatcher
  • ViewAction
  • ViewAssertion
  • String value vs. string id
  • Why not findViewById?
  • Fluent API
  • Hamcrest matcher
3. Espresso Test Recorder
  • Write tests automatically
  • Record actions
  • Add assertions
  • Generated code
4. Pinpointing a View
  • App: Toolbar Title
  • Layout Inspector
  • Combining matchers
  • Pitfall to overspecification
  • Custom matcher: matchesSafely
  • Custom matcher: describeTo
  • Using withToolbarTitle
5. List View
  • onView vs. onData
  • App: List view
  • withValue matcher
  • onData
  • Failing test
6. Recycler View
  • App: Recycler view
  • Cannot use onData
  • MainActivityTest
  • RecyclerViewActions
  • Other recycler view actions
  • Wrap up
Conclusion
  • Next steps

Taught by

Chiu-Ki Chan

Reviews

Start your review of Android Espresso Essential Training

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.