UI Testing with Jetpack and AndroidX
Watch demoDescription
Course Objective:
Take your knowledge of UI testing to the next level by writing real UI tests for a demo app that uses:
- Kotlin
- Dagger2
- Navigation Components
- MVI Architecture (repository pattern)
- A real network layer
- Flows and Channels
We'll be using the newest testing tools from androidx including:
Target Audience:
Those who have some experience writing UI tests. In this course I'll be using the newest tools available so if you think your knowledge of UI testing is getting a bit dated, this will be the perfect course.
WARNING:
There is no database caching in this course. No Room Persistence Library.
Prerequisites:
What you'll learn:
-
Building Test FAKES for any class
- Do not mistake this for mocks. That is something different.
- Custom AndroidJUnitTestRunner
- ActivityScenario
- ActivityScenarioRule
- Types of Mocking and test fakes:
- Dagger Components
- Dagger Modules
- Application class
- Fragment Factory
- Glide ImageLoader
- Retrofit network requests
- Navigation Components:
- Testing navigation (both fragments in isolation and end to end testing)
- Navigation Testing Artifact
- Glide (Setting images in test)
- RecyclerView Testing:
- Scrolling and list item verification
- Clicking items to trigger event
- Stubbing a Test Data Source (Network)
- End-to-end tests with ActivityScenario
- Isolation tests with FragmentScenario
- Configuration changes (activity/fragment recreation)
- Test assets for providing fake network data
- Test Orchestrator:
- Each test runs in its own Instrumentation instance (no/minimal shared state!)
Github repo: Source code
Metadata
Published: Aug. 2, 2021
Lectures: 28
Total video time: 03:16:10