Using Android Gateway 5.6 and Earlier
Your can use Eggplant Functional to make connections to Android devices that are attached by USB to the same machine that is running Eggplant Functional, in which case Android Gateway is not required. However, using Android Gateway provides additional control over the device and the connection. If you want to make a connection to an Android device that is attached to a remote computer, you will need to have Android Gateway running on the remote computer.
Step by Step: Connecting to Devices with Android Gateway
Follow these steps to use Android Gateway to create a connection between Eggplant Functional and an Android device:
- Launch Android Gateway.
- Attach an Android device via USB to the machine where Android Gateway is running. When Android Gateway detects the device, you'll see the Status message change from No Android device detected to Ready to start service.
- Make sure the device is selected in the device list. If you have multiple Android devices connected to the machine running Android Gateway, each of them shows in the table view, so be sure you select the correct device. The list shows the model number of the detected device (as shown in the device's Settings) and the device serial number, as well as the current connection port and status for the device.
Select the device you want to connect to from the device list section of the screen
- (Optional) If you want Eggplant Functional to require a password for connecting to this device, enter it in the Password field in the VNC section of the Settings sidebar. You'll need to enter the same password in the Connection List in Eggplant Functional. Adjust any other settings on the Settings sidebar as necessary for your environment and intended connection. See Android Gateway Settings for information about these settings.
- Click Start to start the VNC service on the connected device. When the VNC service is running, the Status message turns green and displays the IP address and port you need to use to connect to the device. However, see Other Connection Considerations below for special connection circumstances.
- In Eggplant Functional, create a Connection List item for the Android device. See Using the Eggplant Functional Connection List for more information.
- Use the Connection List in Eggplant Functional to open the connection to your Android device.
When you've established a connection, the Eggplant Functional Viewer window displays the Android device screen. You can now capture images on the device and write scripts in Eggplant Functional, using the Android device as you would any other system under test (SUT).
Simultaneous Connections
You can connect to multiple Android devices simultaneously by following the above steps, but you would choose a different device from the list of detected devices for subsequent connections. Each simultaneous connection must use a different port, which you set in VNC section of the Settings sidebar. Settings and configuration choices are saved per device.
See Android Gateway Settings to learn how to configure settings.
Other Connection Considerations
Remember that you can make connections with Android Gateway both from your local machine to a locally attached device as well as to a remote machine that has or devices attached. The instructions above work for making both types of connections. To make a remote connection, you must ensure that Eggplant Functional is able to reach the IP address where Android Gateway is running.
If you're making a connection to a device attached to your local machine, you can set Android Gateway so that it makes the device available only from that machine. To make this setting, go to the VNC section of the Settings sidebar in Android Gateway and set the External port and Local port to the same port number. Note that you can change settings only if the VNC service is not currently running.
Thereafter, when you start the VNC service, the connection information displayed in the Status field shows the localhost IP address, 127.0.0.1, and whichever port number you used in Settings. Use these numbers when you create your connection in Eggplant Functional.