Working with emulators

Emulators let you install and replay tests on emulated devices. Mobile Center lets you test your devices using some of the popular emulators.

The supported emulators are Genymotion and Android SDK.

If you are using UFT, you can also record and run Web tests using the Chrome emulator. For details, see Define settings for testing Web applications using the Chrome emulator.

Setting up the Android SDK Emulator

  1. On the server machine, go to the server/android-sdk-windows folder. If you cannot access the one on the server machine, or if you want to set up the emulator on a Connector machine, see Install SDK tools and emulator images manually.
  2. Open the SDK Manager.
  3. If required, enter the proxy settings. If you don't enter these settings, you will not be able to access the various tool packages. To enter these settings, select Tools > Options, and enter the proxy information. Enable the Use download cache and Force options.
  4. From the SDK Manager, install (at least) the following packages: Android SDK Tools, Android SDK Platform-tools, Android SDK Build-tools, and Android API (API 19 and higher). SDK Platform, Samples for SDK. Click the Install packages button. Make sure to install all API versions for OS version 4.2 and higher.
  5. Open the AVD (Android Virtual Device) Manager. The AVD manager allows you to create a profile of a virtual device that can then be run on the Windows host and connect to the Mobile Center server via a Mobile Center connector.

  6. In the AVD manager, go to the Android Virtual Devices tab. Click Create to generate a profile for the device you want to emulate. Enter the relevant details.

    In the CPU/ABI type field, select Intel Atom (x86). In the Emulation Options, select the Use Host GPU check box to enable graphics acceleration. Click OK.

    The device should now appear in the list of existing virtual devices.

  7. Select the device and click Start. Once the emulated device starts, it should appear in the Mobile Center console as an available test device. If it does not, stop the device by closing its window. Restart the Mobile Center Connector. After the Connector has started, restart the device emulation.

Back to top

Create a test with an emulator

To prepare a test through an emulator:

  1. Install your emulator. Prepare your environment as described by your emulator's documentation.
  2. When using Genymotion, configure the adb using the same settings as you used when installing the Mobile Center connector. In Genymotion, select Settings > ADB tab > Use custom Android SDK tools.

    • If you have an ANDROID_HOME environment variable, use the same adb path as you used when setting up the connector for Use custom Android SDK tools in Genymotion.
    • If you do not have an ANDROID_HOME environmental variable, the connector will use the embedded adb tools. Set the Use custom Android SDK tools to <Mobile Center Connector>\connector\android-sdk-windows.
  3. Start the emulator. Choose the device to emulate.
  4. Select an emulated device within your tool (UFT, Sprinter, or TruClient) in the Device selection area.

  5. Record actions on the app within the emulator.

Back to top

Install SDK tools and emulator images manually

The default installation of the connector does not include the SDK emulator tools. If you would like to install the emulator on your Connector machine, perform the following steps:

  1. Download the Android SDK Tools package from the Android SDK website. We recommend SDK version 25.2.2.
  2. Extract the contents of the zip file to a folder named tools. Copy the newly created tools folder to the same folder as the SDK Manager.exe file, the connector installation's, android-sdk-windows folder.
  3. Double-click the SDK Manager executable file, SDK Manager.exe.
  4. If you are accessing the SDK manager through a proxy server, enter the proxy information:

    1. Select Tools > Options to open the Settings dialog box.
    2. Enter the HTTP Proxy Server and Proxy Port values.
    3. Click Close.
  5. In the Android SDK Manager window, choose the emulator images to install under the Tools node. Note that each Android version has its own image.

    Tip: Use Intel x86 base images for better performance on machines that support Intel HAXM (Hardware Accelerated Execution Manager).

  6. Expand the Extras node and select Intel x86 Emulator Accelerator (HAXM installer).
  7. Click Install <x> Packages.
  8. Continue with opening the AVD to select devices, as described in Setting up the Android SDK Emulator.

Back to top

Tips for Using the Android SDK Emulator

  • When using the Android SDK emulator, it is recommended to use HAXM instead of the ARM configuration. Make sure the Intel x86 Emulator Accelerator (HAXM installer) is installed in the Android SDK Manager. Then, run the setup located in <android-sdk folder>\Extras\Intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android.exe.
  • The Restart button in Mobile Center is disabled for Android SDK emulator devices.
  • Certain apps cannot be installed on the SDK emulator with an ARM configuration. As a workaround:

    • In most instances, it is recommended to work with Android SDK with HAXM.

    • In the following instances use the ARM configuration:

    • For recording, close the remote access window and record on the device.

    • For replay, record on Genymotion or Android SDK x86 with HAXM, and replay in silent mode in UFT.

    • Start the emulator in headless mode.

    • Reduce the resolution of the device.

Back to top

Troubleshooting and tips

Emulator support is provided for Android 4.1 and higher, and an API level of 19 or higher. For more information, see Device emulators.

The following guidelines apply:

  • When using an emulator for devices with Android 6.0 and higher, SMS simulation is not supported.
  • In RHEL (Red Hat Enterprise Linux) 6.5 environments, you cannot work with the remote screen viewer on emulators, since this version of RHEL does not support GPU acceleration. (GPU acceleration is available on Windows machines, or Linux machines with RHEL 7 and higher.)
  • Emulation is not supported for apps that have full control of the adb, such as Wandoujia.

Back to top