Automated Android UI Testing

UI tests are tests that make sure the app returns the correct output based on user input in the UI. Tools are needed to automate these tests, such as Espresso. I will be going over four different techniques for doing these automated tests.

End-to-End: this way of testing makes sure the whole system is functioning correctly. But using this method can be very large and slow but it covers the whole system.

Hermetic UI Testing Using Fake Servers: this method you can avoid using external dependencies. You chose what the server is sending to your app, so you have more control. This way reduces test sizes and improves accuracy, but you’ll have to maintain a separate server.

Dependency Injection Design: this will eliminate the need for a fake server. This makes it possible to mock dependencies, improving the accuracy of your tests.

Building Apps into Smaller Libraries: if you plan on adding more feature you should consider building your app into small libraries. This lets you mock dependencies for each library. This means smaller tests and increased accuracy.

https://testing.googleblog.com/2015/03/android-ui-automated-testing.html

Leave a comment