Skip to main content
Version: 23.5

Reverse VNC Connections

If you are unable to configure the firewall of a SUT to accept VNC connections, you can often open a reverse connection, in which the SUT initiates the VNC connection and the Eggplant Functional computer accepts it. If you're testing mobile devices, you can use reverse connections from Android Gateway or iOS Gateway to allow automation using Eggplant Functional.

The Eggplant Functional side of reverse connections is described below; for the SUT, refer to its VNC server documentation.

Step by Step: Preparing Eggplant Functional for Reverse Connections

  1. Go to Eggplant > Preferences, then select the Connection tab.

    Reverse connections dialog in Eggplant Functional

  2. Select the Listen for reverse connections checkbox.

  3. In the Port field, you can specify the port number for reverse connections. The default port is 5500.

  4. Configure your router (and any additional firewall on your system) to allow connections on port 5500. See Apple documentation for information on modifying the Mac OS X internal firewall. Refer to the specific documentation for any external firewalls.

Step by Step: Reverse Connections with Android Gateway

Reverse connections can be made locally (Eggplant Functional and Android Gateway running on the same machine) as well as remotely (Eggplant Functional and Android Gateway running on different machines).

note

Reverse connections are not available for LG G5 devices.

note

To make a reverse connection, the Android device must be using Wi-Fi and must be on the same Wi-Fi network as the machine running Eggplant Functional. The exception to this requirement is if you are testing devices running Android OS 5.0 and later, and the device is connected to the same machine that is running Eggplant Functional. In that case, you can use the localhost IP address, 127.0.0.1, for the reverse IP address to make a connection without Wi-Fi.

Follow the steps below to set up and open a reverse connection:

  1. Launch Eggplant Functional.

  2. In Eggplant Functional, go to the Connections tab in Preferences (Eggplant > Preferences) and select Listen for reverse connections. Note that you can change the port where Eggplant Functional listens for reverse connections; be sure that the port matches the port you set in Android Gateway (see step 6).

    Enable reverse connections in the Eggplant Functional Connection Preferences window Make sure that Eggplant Functional is listening for reverse connections

  3. Launch Android Gateway, then connect an Android device via USB to the machine where it is running.

  4. In the Android Gateway Settings sidebar, expand the Reverse Connection section, then select Enable reverse connection.

  5. In the IP Address field, enter the IP address for the machine where you're running Eggplant Functional.

  6. For the reverse Port field, 5500 is the default. You can use a different port. Make sure the port you use here matches the port set in Eggplant Functional.

  7. In Android Gateway, click Start. When the connection is established, the Connection List in Eggplant Functional automatically shows the active connection. Double-click the connection if you want to open a Viewer window.

Step by Step: Reverse Connections with iOS Gateway

Reverse connections can be made locally (Eggplant Functional and iOS Gateway running on the same machine) as well as remotely (Eggplant Functional and iOS Gateway running on different machines).

Follow these steps to configure and launch a reverse connection with an iOS device:

  1. Launch Eggplant Functional.

  2. In Eggplant Functional, go to the Connections tab in Preferences (Eggplant > Preferences) and select Listen for reverse connections. Note that you can change the port where Eggplant Functional listens for reverse connections. Be sure that the port matches the port you set in iOS Gateway.

    Enable reverse connections in the Eggplant Functional Connection Preferences window Make sure that Eggplant Functional is listening for reverse connections

  3. Open iOS Gateway and connect an iOS device.

  4. In iOS Gateway, go to Device > Reverse Connection.

  5. Enter the IP address of the Eggplant Functional machine in the Client field, and the appropriate port number in the Port field. Make sure the port number you enter here matches the port number entered in Eggplant Functional.

    note

    The default port for reverse connections is 5500.

    Reverse connection sheet in iOS Gateway Reverse Connection sheet in iOS Gateway.