The UI Automator testing framework provides a set of APIs to build UI tests that perform interactions on user apps and system apps. The UI Automator APIs allows you to perform operations such as opening the Settings menu or the app launcher in a test device. The UI Automator testing framework is well-suited for writing black box-style automated tests, where the test code does not rely on internal implementation details of the target app.
The key features of the UI Automator testing framework include:
A viewer to inspect layout hierarchy. For more information, see UI Automator Viewer.
An API to retrieve state information and perform operations on the target device. For more information, see Access to device state.
APIs that support cross-app UI testing. For more information, see UI