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:
    1. Dagger Components
    2. Dagger Modules
    3. Application class
    4. Fragment Factory
    5. Glide ImageLoader
    6. 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!)

Watch the video course here: UI Testing with Jetpack and AndroidX.

Contributors

  1. @R4md4c