A basic app to learn how to test an Android project.
- setting up, running, and interpreting both local and instrumental tests in Android.
- writing unit tests in Android using JUnit4 and Hamcrest.
- writing simple LiveData and ViewModel tests with the AndroidX Test Library.
- making a fake data source.
- writing a test using dependency injection.
- setting up a fake repository.
- using the fake repository inside a ViewModel.
- launching a fragment from a test.
- making a ServiceLocator.
- writing an integration test with Espresso UI testing framework.
- using Mockito to write Navigation tests.
- testing coroutines, including view model scoped coroutines.
- pausing and resuming coroutine execution for testing.
- testing error handling.
- writing DAO unit tests.
- writing local data source integration tests.
- writing end-to-end tests that include coroutine and data binding code.
- writing global app navigation tests.
Based on 3 tutorials by Google Codelabs (2022):