Android Development and Testing

Hello World! Android Unit Testing with Espresso

Tackling android unit testing has more than one approach. A library file or class file(s) without android dependencies can utilize JUnit or any other Java unit testing framework. However, as soon as the code that you want to test is dependent on Activity Context you write instrumentation tests that execute on actual devices or virtual devices.