Skip to main content

Connecting to SUTs with Android Gateway

Android Gateway is a free browser application that you download from the Eggplant downloads page. It works with Eggplant Functional to make connections to Android devices for test automation. You can connect to Android devices from a local machine where the device is connected via USB, or connect remotely to a computer that has connected Android devices.

note

For Android device testing, Eggplant Functional also provides an integration with Sauce Labs. Sauce Labs makes it easy to test against a plethora of Android devices with varying versions of the OS installed. When using Sauce Labs, there is no need to use the Android gateway. The Sauce Labs device connections are integrated directly into Eggplant Functional.

Click Here for more information.

Important

The information on this page is for Android Gateway 6.0 and later. For information about automating with older versions of Android Gateway, see Indirect Android Connections.

You create tests against Android devices in the same manner that you would with any other SUT: by managing your connections using the Viewer window and Connection List in Eggplant Functional.

Set up Android Gateway

Before you install Android Gateway, make sure that your computer and Android devices meet the following requirements, and take note of the other considerations listed. Android Gateway 6.0 uses ADB version 1.0.41.

System Requirements

Runs on: Windows 10. macOS 11. macOS 10.15, macOS 10.14, macOS 10.13. RedHat 7; CentOS 7; Ubuntu 16.

Connects to: Android 5.0 and later. Minimum API version 21.

Supported browsers: Recent versions of Google Chrome, Safari, Firefox, and Microsoft Edge

Ports: HTTP: 32000; TCP 5900-5950 (VNC); TCP 8100-8150 (WebDriver)

Note: Testing Android versions older than 5.0 requires Android Gateway 5.6 or earlier.

Note: Starting with Android Gateway 6.0, Windows 7 and macOS 10.12 are not supported. Use Android Gateway 5.6 instead.

note

On Windows, you might need to install a USB driver to allow Android Gateway to detect some devices. See OEM USB Drivers on the Google Developers website for more information.

note

When Android Gateway launches, it kills any running ADB processes on your computer. This includes the Windows My Phone app.

Step by Step: Install Android Gateway

To install Android Gateway, download the appropriate version for your computer's OS, then follow the steps below:

  1. Double-click the installation file you downloaded.
  2. Follow the appropriate installation steps for your computer's operating system:
    1. For Windows installations, follow the prompts from the setup wizard.

      The Android Gateway setup wizard for Windows

    2. For Mac installations, drag the Android Gateway icon into the Applications folder.

      Installing Android Gateway on Mac

Allowing Mock Locations on Android Devices

In order to allow the SetDeviceLocation command to work on an Android device, you must change some developer settings on the device.

  1. Go to Settings > Developer Options > Mock Locations and turn on that functionality.
  2. Go to Settings > Applications > eggSensor > Permissions and turn on Your location.

Allowing SetDeviceOrientation

In order to allow the SetDeviceOrientation command to work on an Android device, you must change an application setting on the device.

  • Go to Settings > Applications > eggSensor > Advanced and turn on Modify system settings.