Objective: Discuss the types of Android testing and test cases that we may have in real world application.
First, There are two types of testing that can be done:
- Junit or unit tests, where we can test the logic behind the application
- Integration test, where we test the UI of the application
Test cases that we may have in real world application inside JUnit or unit tests:
- Test if the function call has been made
- Test if the parameters are what we are expecting from the method call
- Count number of times the method has been called
- Spy method calls
Test cases that we may have in real world application inside Integration test: We can use espresso and other libs based on the requirements
- Check if the error or validation has been succeed in any given UI
- Check if test/element is present, such as on button click or on tap of add to cart, is cart count changed or not
- Tap on info window of map marker bubble
- Check if deeplinks opens correct UI or not
All this test cases has been done one by one on different branches.