Join Chiu-Ki Chan for an in-depth discussion in this video RecipeAdapter: OnClickListener, part of Effective Android Testing for Mobile Developers.
- [Instructor] Let's create "RecipeActivity".…Right click on the top package name in the Java directory…on the project tree.…Select "New", "Java Class".…We will call it, "RecipeActivity."…In the package,…append ".ui.recipe"…Press OK.…We will have "RecipeActivity extends AppCompactActivity".…Next, we will need to override the "Oncreate" function.…
Press Control All, and type "Oncreate" to select that one,…and press OK.…Inside "Oncreate", we will "setContentView"…to the layout file that we just created.…"R.layout.activity_recipe".…Next, we will need to put this activity…in our manifest file.…Open "AndroidManifest.xml",…copy and paste line 10 to line 15 for the main activity,…paste it, and change the name to "RecipeActivity."…You will need to change the package name as well,…".ui.recipe.RecipeActivity."…We don't need the Intent Filter,…because this is not the entry point of our app.…
So delete those lines, from 17 to 20.…Finally, we will add a parent activity name.…Inside the tag for the activity, "RecipeActivity",…add "android:parentActivityName",…
- 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 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.