Join Chiu-Ki Chan for an in-depth discussion in this video What vs. How, part of Effective Android Testing for Mobile Developers.
- [Instructor] In the recipe activity test, we check if a recipe is favorited by checking if the title is selected. What happens when we change the app, say to use an image view to show the favorite status? We'll have to go over every place that we check for it selected and update that. Our test will be more maintainable if we separate the what from the how. Here, the what is whether the recipe is a favorite, and the how is whether the title is selected.
One way to separate the what and the how is to use the robot pattern. The robot is a class that exposes an API that reflects the what, the actions, and verifications for a particular screen and hides the how in the implementation. Next, let's write a robot.
- Why test?
- Local vs. on-device
- Code coverage
- UI testing
- Hermetic environment
- Dependency injection
- Testing with MVP
Skill Level Intermediate
Android App Development: Unit Testingwith James P White2h 58m Intermediate
Android Studio Essential Trainingwith David Gassner3h 41m Beginner
Android App Development: Data Persistence Librarieswith Annyce Davis4h 52m 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.