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
-
Go to Eggplant > Preferences, then select the Connection tab.
-
Select the Listen for reverse connections checkbox.
-
In the Port field, you can specify the port number for reverse connections. The default port is 5500.
-
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).
Reverse connections are not available for LG G5 devices.
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:
-
Launch Eggplant Functional.
-
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).
Make sure that Eggplant Functional is listening for reverse connections
-
Launch Android Gateway, then connect an Android device via USB to the machine where it is running.
-
In the Android Gateway Settings sidebar, expand the Reverse Connection section, then select Enable reverse connection.
-
In the IP Address field, enter the IP address for the machine where you're running Eggplant Functional.
-
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.
-
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:
-
Launch Eggplant Functional.
-
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.
Make sure that Eggplant Functional is listening for reverse connections
-
Open iOS Gateway and connect an iOS device.
-
In iOS Gateway, go to Device > Reverse Connection.
-
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.
noteThe default port for reverse connections is 5500.
Reverse Connection sheet in iOS Gateway.