- [Instructor] Let's take a look at what happens…when the test fails.…We'll need to change the test…to look for the value of 37 instead of 27 on line 26.…This should fail because the list only contains up to 29.…Let's run the test and take a look.…Click on the green triangle.…Indeed, if you look at the bottom left corner,…you can see that the test method clickItem failed.…
Click on it to see the error message.…It says Error performing load adapter data on view with id…and then id/list.…Scroll down…and you can see that in the clickItem method…is where it fails.…
Keep scrolling…and it says caused by java.lang.RuntimeException:…No data found matching: has value 37.…This string has value 37 is provided by our bounded matcher.…Scroll down in the code.…On line 38,…you can see that it says has value…with the value we are looking for appended.…
This is why we want to add the describe to method…in our bounded matcher…in such a way that when something fails,…we can see what's going on…and what do we expect.…
- 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.