Effective Android Testing for Mobile Developers
Overview
Explore effective testing techniques for Android by walking through an app development workflow where testing is integrated throughout the process.
There's a difference between knowing how to implement testing and knowing when and why to do it. In this project-based course, get acquainted with best practices for testing Android apps by walking through a development workflow where testing is integrated throughout the process. As instructor Chiu-Ki Chan shows how to build the app, she explores the differences between JVM and on-device tests, explaining when to use each one. She also explores advanced techniques such as the MVP pattern. By demonstrating how testing fits into an app development workflow, she helps you bolster your ability to catch bugs—and determine where and when you should test.
There's a difference between knowing how to implement testing and knowing when and why to do it. In this project-based course, get acquainted with best practices for testing Android apps by walking through a development workflow where testing is integrated throughout the process. As instructor Chiu-Ki Chan shows how to build the app, she explores the differences between JVM and on-device tests, explaining when to use each one. She also explores advanced techniques such as the MVP pattern. By demonstrating how testing fits into an app development workflow, she helps you bolster your ability to catch bugs—and determine where and when you should test.
Syllabus
Introduction
- Welcome
- What you should know
- Using the exercise files
- Why test?
- Types of tests
- Local vs. on-device
- The sample app
- Smallest unit first
- TDD: Red, Green, Refactor, part 1
- TDD: Red, Green, Refactor, part 2
- Code coverage
- UI-less on-device test: RecipeStore
- UI-less on-device test: Setup
- UI-less on-device test: Null test
- UI-less on-device test: Count test
- UI-less on-device test: Lookup test
- RecyclerView
- Showing Recipes in MainActivity
- RecipeActivity: Layout
- RecipeAdapter: OnClickListener
- RecipeActivity: Loading a recipe
- Vector drawable: Create
- Vector drawable: Use
- SharedPreferencesFavorites
- Favorite: OnClickListener
- RecipeActivityTest: An espresso test
- Test doubles
- Dependency injection
- InMemoryFavorites
- RecipeApplication
- TestRecipeApplication
- CustomTestRunner
- Test state: Setup
- Test state: Test
- What vs. How
- ScreenRobot
- RecipeRobot
- Clear favorites
- Separation of concerns
- Introduction
- View Interface and Presenter
- Refactor: Load recipe
- Refactor: Show error
- Refactor: Show recipe
- Refactor: Toggle favorite
- Mockito: Intro
- Mockito: Setup
- Testing with MVP: recipeNotFound()
- Testing with MVP: Exception
- Testing with MVP: ArgumentCaptor
- Summary
- Next steps
Taught by
Chiu-Ki Chan