To create and run TestComplete tests for Android applications working on Android-x86 virtual machines, you need to prepare these virtual machine for testing. This topic provides detailed information on preparatory actions.
In this topic:
TestComplete works with Android devices and virtual machines via Android Debug Bridge (ADB) which is part of the Android SDK. You need to download and install this SDK on your TestComplete computer (see Preparing Test Computers and TestComplete for Android Testing).
To prepare an Android virtual machine for testing, you need to connect the virtual machine to Android Debug Bridge and then install TestComplete Android Agent on the machine.
The main goal of these actions is to make Android Debug Bridge “see” your Android virtual machine.
To test applications running on Android virtual machines, these virtual machines must emulate a network adapter and be available via the network to your TestComplete computer.
For detailed information on configuring network parameters, see documentation on virtual machines you use.
Important: You need to connect your Android virtual machine to the Android Debug Bridge in order for TestComplete to be able to work with this virtual machine. Connection is required for both test recording and running.
To connect, you need to determine the IP address of the machine and pass it to the
adb connect command. For detailed information, see Connecting TestComplete to Android Devices.
You need to set up a connection for the virtual machine after it starts. When you have established a connection, you can use it until it is broken, that is, until the virtual machine is off, or until the ADB executable restarts, or until the user session in the operating system is over.
Installation of the Android Agent is also recommended for black-box testing as it is needed for simulating keystrokes and it simplifies testing geolocation activities.
For information on installing the Agent, see the Agent description.
|Requirement: In order for the Android Agent to be able to work on a virtual machine, the machine must have 512 MB of RAM or more.|
Android devices (both physical and virtual) have a number of security settings aimed at protecting your device from potentially harmful applications. If you experience issues with installing your tested Android applications on your device from TestComplete, consider configuring the following settings:
If your virtual machine is running under Android OS version 4.0 - 4.1:
If your virtual machine is running under Android OS version 4.2 or later:
On your Android, virtual machine do the following:
Go to Settings | Security and disable the Verify apps option.
-- or --
Go to Settings | Developer options and disable the Verify apps over USB option.
You may also need to allow installing applications from unknown sources:
On your Android virtual machine, go to Settings | Security (or Settings | Applications) and enable the Unknown sources option.
|Configuring the settings as described above may reduce the security of your Android virtual machine.|
Besides preparing Android virtual machines for testing, you also need to configure TestComplete. For detailed information on this, see Preparing Test Computers and TestComplete for Android Testing.
Also, it is recommended to prepare your Android application for testing and test it as an Open Application. For complete information, see Instrumenting Android Applications - Overview.