- [Instructor] In the previous chapter,…we learned how to use the onData formula with ListView.…In this chapter,…we will be looking into RecyclerView,…which is functionally very similar to ListView,…but we need to use a different technique…to write Espresso tests for it.…To get started,…download the project from Exercise Files…and import it in Android Studio.…It doesn't matter where you put the project.…
I put it under projects/recycler-view.…If Android Studio asks you to update the Gradle plug-in,…just say Don't remind me.…Run the app by clicking on this green triangle.…Choose your device.…Press OK.…Functionally,…this app is identical to the one in the ListView chapter.…There is a list of numbers,…and when you click on one,…it appears in the gray footer.…
Let's take a look at the code.…Press Command + O to open MainActivity.…As you can see,…instead of using ListView,…we are using RecyclerView in this app.…Even though the UI may look and behave the same,…but since we are using RecyclerView instead of ListView,…we need to test it differently.…
- 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.