Setting Up Tunneling
RobusTest tunneling lets you route all network traffic from a test device through a specific machine on your network. This is useful for testing against internal environments or staging servers that are not publicly accessible.
How It Works
- The test device sends traffic through the RobusTest tunnel server.
- The tunnel client running on your machine forwards that traffic to your target system.
- You pass a unique tunnel key in your test configuration to associate the device session with your tunnel client.
Setup
Step 1: Configure the device proxy
On the test device, set the HTTP proxy to auto-configuration and point it at:
http://<RobusTest URL>/tunnelConf
For iPhone:
- Go to Settings → Wi-Fi
- Tap the info icon next to your Wi-Fi connection
- Scroll to HTTP Proxy and select Auto
- In the URL field, enter
http://<RobusTest URL>/tunnelConf
Step 2: Download the tunnel client
Download the tunnel client binary for your operating system from your RobusTest instance:
| OS | Download URL |
|---|---|
| Linux | <Device Lab URL>/v3/download/file/robustest_tunnel_linux_amd64 |
| macOS | <Device Lab URL>/v3/download/file/robustest_tunnel_mac |
| Windows | <Device Lab URL>/v3/download/file/robustest_tunnel_window_386.exe |
Step 3: Start the tunnel client
On the machine you want traffic routed through, run:
{tunnel client filename} connect --key <unique-key> --nerve <RobusTest_URL> --accessKey <User Access Key>
--key— a unique identifier you assign to this tunnel connection. Make note of this value — you will need it in your test configuration.--nerve— the URL of your RobusTest server--accessKey— your RobusTest user access key
Step 4: Pass the tunnel key in your tests
When running Appium tests, pass the tunnel key as a desired capability:
"robustest.tunnelKey": "<your-unique-key>"
or
"robustest:tunnelKey": "<your-unique-key>"
Required Port Access
Ensure the following ports are open in your network:
| Traffic | Ports |
|---|---|
| Tunnel client → tunnel server | 3000–5000 |
| Test device → tunnel server | 1080 |
| Device lab → tunnel server | 9321 |
