To run Android tests with TestExecute, you need to prepare your Android device for testing.
TestExecute works with Android applications via the Android Debug Bridge (ADB) which is part of Android SDK. You need to download and install this SDK on your TestExecute computer.
The main goal of preparatory actions is to make ADB “see” your Android device. The steps described in this topic work for most devices. However, certain devices may require additional actions. For more information on them, read documentation on developing applications for your device.
Currently, TestExecute can work with physical Android devices that are connected to your computer via a USB cable. It does not work with physical devices that are connected to your network via Wi-Fi or some other protocol.
1. Enable Developer Options on the Device
To perform testing on a physical Android device, you need to enable certain developer options on the device:
Make the developer options visible. Go to Settings | About phone/tablet and touch Build number 7 times.
Note: The way, in which you make the developer options visible, may vary between devices and Android versions. Please refer to the documentation on your device for more information.
Go to Settings | Developer options and enable the following options:
USB debugging - Enables communication between the device and ADB. In other words, it makes your device visible to ADB and TestExecute.
Stay awake - Prevents the device from going into sleep mode during debugging.
Note: If you have a Xiaomi device, you may also need to enable the Install via USB option. To enable this option, you must have an active Mi account, and a SIM card must be installed in your device.
Save the changes.
2. Install the Device USB Drivers
In order for ADB to be able to see your Android device, you need to install the device USB drivers on your computer. If you installed the software provided by the device manufacturer (for example, a data synchronization tool), the driver may have already been installed on your computer. If you are not sure about this, please install (or reinstall) the drivers from the manufacturer's web site. For instructions and driver download links, see OEM USB Drivers in the Android documentation:
To ensure the device driver is installed properly, connect your device to the computer via USB and open the Control Panel | Device Manager applet on the computer. Your device should be listed under the Portable Devices node there. It can also be listed as a top-level node with the word Android in its name, for example, Android USB devices, SAMSUNG Android Phones, ASUS Android Devices and so on. If the device is listed under some other name or has an error, warning or question icon, reinstall the device driver using the link above.
3. Disable Manufacturer’s Synchronization Software
Some device manufacturers provide software for synchronizing data between the device and PC. Some of this software, for example, HTC Sync Manager, include a custom version of Android Debug Bridge (adb.exe) that may conflict with the version that is included in the Android SDK and is used by TestExecute.
To perform Android testing, you need to close any non-standard ADB processes and disable (or uninstall) manufacturer services that include non-standard ADB.
4. Install TestComplete Android Agent
If you are going to test your Android application as an Open Application, the TestComplete Android Agent must be installed on your device. Installation of the Android Agent is also recommended for black-box testing, as it is needed for simulating keystrokes and simplifies testing geolocation activities.
TestExecute installs the Android Agent on your device automatically when you first connect to it.
For information on installing the Agent, see the Agent description in TestComplete documentation.
Other Preparatory Actions
Besides preparing Android devices for testing, you need to configure TestExecute. For detailed information on this, see Android Options Dialog.
Also, it is recommended to prepare your application for testing and test it as an Open Application. For complete information, see TestComplete documentation.