Standard Java JVM tests can be done using JUnit testing framework. But for testing User Interface of a Android app we need to do Instrumentation tests. These Instrumentation tests can be done by using the Espresso testing framework. In this tutorial we are going to do UI testing on an Android app. For UI testing we are going to use one of our previous Login registration project https://www.learn2crack.com/2016/04/android-login-registration-php-mysql-client.html.
We are not going to create entire project from Scratch. We are using existing project and write UI testing code for it.
We are going to test 4 use cases on the Registration Screen.
- Check whether Registration is success.
- Check whether the system allows duplicate Registration.
- Check Registration with Invalid email id.
- Check Registration with empty fields.