Course Demo
updated Aug. 2, 2021
Course Objective:
To provide an introduction to UI testing on android with Espresso, Mockk and some of the most useful test classes in androidx.test.
Target Audience:
Complete beginners when it comes to UI testing. There is no required knowledge.
What you'll learn:
- Kotlin
- Testing Activities in Isolation:
- ActivityScenario
- ActivityScenarioRule
- Activity Navigation:
- Intents and startActivity
- Back navigation
- Test Suites:
- Running multiple test classes in a suite
- Firebase Test Lab:
- Run UI tests on hundreds of virtual devices using Firebase Test Lab
- Testing Fragments in Isolation:
- FragmentScenario
- launchInContainer
- FragmentFactory
- Fragment Navigation:
- Testing fragment transactions
- Fragment transactions with FragmentFactory
- Mockk (Mockk.io):
- Mocking dependencies
- Constructor injection (no dagger)
- Intents:
- IntentsTestRule
- Retrieving activity results
- Choosing image from gallery
- Capturing an image with camera
- Dialogs:
- Material Dialogs (Library)
- Is dialog visible?
- Capturing input from user
- Toasts:
- Is toast visible?
- RecyclerView:
- Scrolling to list item
- Clicking list items
- List item verification
- Espresso Idling Resource:
- Required for background work
- Creating Custom Test Rules:
Github repo: Source code