Sometimes, it is necessary to have high level, end to end, UI automation tests on an android application to ensure that features work as expected in “real world” production environments.
UI Automator is a library that can be used to implement this kind of test.
In this post, I will discuss how to write UI automation tests for an Android app using UI Automator.
First, we will create a very simple Android app:

The app has a TextField and a Button.
When the user types in a name into the TextField and clicks on the save button, the app will display a welcome message: