Automating the Android testing process
You can automate the process of testing Android apps with several command line tools,
the Android Debug Bridge (adb), and the USB Controller. The USB Controller also makes it possible
to test in secure environments.
Before you begin
- Install HCL OneTest™ UI and ensure that the Extension for Mobile is selected. For details, see Installing the product software.
- Download and install adb, which is part of Android SDK Tools, on the computer running the test workbench. The current download page is at Android Studio but the location could change in the future. You do not need to install the full Android Studio. Just navigate to the SDK Tools Only section under Other Download Options to obtain the installer. Make sure your device is correctly setup for adb by executing the adb devices command.
- To test on Android emulators, set up one or more AVD (Android Virtual Device) configurations. For details, see Using the Emulator. This article also describes ways to improve emulator performance through hardware acceleration.
- To test on Android devices, enable USB debugging by going to test workbench. If necessary, obtain the specific USB driver for your device from http://developer.android.com/tools/extras/oem-usb.html or go to the web site of the device vendor. on an Android device. Then, connect the Android device with a USB cable to the computer that is running the
- As an alternative for testing on Android devices, you can use the USB Controller, which provides silent install mode on Android devices and emulators, regardless of the API level, and also allows you to work in secure environments that have no WiFi access. With the USB Controller, you can also work in an environment where the test workbench is remote. See Installing and configuring the Android client with the USB Controller for details.
- You cannot run a test from the command line on Mac OS X.
- Record the test scripts for the application under test (AUT). The test recording process cannot be automated. See Recording tests from the Android mobile test client for details.
About this task
The automation process includes the following procedures:
- Adding the applications under test (AUT) to the test workbench
- Installing the latest release of the AUT on an Android device or emulator
- Installing the mobile test client on an Android device and starting it in passive mode
- Running the test from the command line or by using the UrbanCode Deploy plugin