Join Chiu-Ki Chan for an in-depth discussion in this video RecyclerView, part of Effective Android Testing for Mobile Developers.
- [Instructor] Now that we have a RecipeStore,…let's use that in our app.…This part is not strictly related to testing,…but I want to show you all the steps of building this app…so that you can see when to add tests.…As you have already seen,…it is very useful to write tests along the way…rather than wait until the very end.…We will display the recipes in a RecyclerView.…To do that,…we'll need to add that as a dependency.…
Go to app/build.gradle.…In the dependency block,…go to line 23,…and press Command + D to duplicate.…Replace appcompat-v7…with recyclerview-v7.…Click Sync Now to perform a gradle sync.…Next, open the resource folder.…In layout, open activity_main.…
Change the TextView to be a RecyclerView.…Give it the id recipes…and the padding of 8dp.…To populate the RecyclerView with recipes,…we need to create a ViewHolder and an Adapter.…Click on the main activity on the file directory.…It will be under Java, ui.main.…
Right-click on the folder, New, Java Class.…Call it RecipeViewHolder.…We will need to extend this from RecyclerView.ViewHolder,…
- Why test?
- Local vs. on-device
- Code coverage
- UI testing
- Hermetic environment
- Dependency injection
- Testing with MVP
Skill Level Intermediate
1. Testing Considerations
2. Test as You Go
3. UI Testing
4. Hermetic Environment
5. Robot Pattern
- 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.