- The first part of the Espresso formula…is the view matcher.…We are going to do that in our test method greet.…In Line 19 at onView(withId(R.id.greeting))…Press alt enter to resolve the imports.…What does this mean?…OnView tells Espresso that we are looking for a view.…
Which view?…withID tells Espresso that we want…the view to have the ID R.id.greeting.…Once we found the view using the view matcher,…we need to do something with this view.…In our case, we would like to check that…when the app first started…this view does not contain any text.…So after OnView you can add .check(matches(withText…and give it the empty string.…
Once again, press alt enter to import.…Here, when you press alt enter for withText,…it gives you a few choices.…Choose ViewMatches.withText.…For matches, choose ViewAssertions.Matches…All right, let's talk through this again,…because there are many different functions we are calling.…In line 24, what we are doing is using…the Espresso formula for the check pot.…
We tell Espresso to check that this view matches…
- Advantages of Espresso and automated testing
- 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
Skill Level Beginner
Android App Development: Data Persistence Librarieswith Annyce Davis4h 52m Intermediate
Effective Android Testing for Mobile Developerswith Chiu-Ki Chan2h 56m Intermediate
Advanced Android Espresso Testingwith Chiu-Ki Chan1h 37m Advanced
1. What Is Espresso?
2. Your First Espresso Test
3. Espresso Test Recorder
4. Pinpointing a View
5. List View
6. Recycler View
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.