Of
The Android SDK provides the following tools to support our UI Automation testing:
Uiautomatorviewer: A tool used to scan and analyze the UI controls for an Android application.
Uiautomator: A Java library that includes creating tests and executing automated test APIs.
Google Uiautomator Documentation: http://android.toolib.net/tools/help/uiautomator/index.html
To use these tools, you must install the following version of the Android development tool:
Android SDK Tools:api version 21 or more than 21;
Android SDK PLATFORM:API version 16 or more than 16.
Profiling controls
Before you start writing test cases, using Uiautomatorviewer can help you familiarize yourself with your UI components (including views and controls).
You can use it to take a snapshot of the phone screen currently connected to your computer, and then you can see the hierarchy of the current page on the phone and the properties of each control. With this information, you can write test cases for specific UI controls.
In.. \sdk\tools\ directory to open the Uiautomatorviewer.bat (before opening the phone to connect the computer, mobile phone to turn on USB debugging).