Tunnels are helpful when you need to test a website or web service hosted on your own computer or behind your firewall. Typically, these sites and services are restricted from the global network to prevent unwanted external access. For this reason, CrossBrowserTesting’s fleet of devices and browsers need a secure connection to local resources — a tunnel.
To set up a tunnel, CrossBrowserTesting offers a special tool called SecureTunnel. It is available in form of a desktop application and a command-line utility (see below). You can download both from the CrossBrowserTesting UI.
This is the second incarnation of this tool. The previous one was called CBT Tunnel. Information on it is available in the CBT Tunnel (Legacy) section. The main difference between the legacy CBT Tunnel and the newer SecureTunnel is that the latter also works on BitBar and is more reliable, stable, and faster.
How does the tunnel work?
To set up a tunnel, you install and run the lightweight SecureTunnel utility on a computer that has access to both the global Web and the tested web application in your network. The test device working in the CrossBrowserTesting farm connects to your local resources through this tunnel:
The tunnel client opens a secure outbound WebSocket connection to the CrossBrowserTesting.
Devices used in testing will navigate HTTP and HTTPS traffic over the connection.
The requests coming through the tunnel are resolved on the machine, where tunnel is running. The tunnel resolves URLs using the DNS server that computer uses, and forwards requests to the tested server. It also receives responses of the tester server and forwards them to the device used in the test session in the CrossBrowserTesting cloud.
The way you install the tunnel app, start it, run tests and close the connection depends on whether you use the tunnel as a desktop application or a command-line utility.
Set up SecureTunnel
To set up and control the tunnel, you can use —
The desktop app is a wrapper on the command-line functionality. It provides a visual interface to the tunnel settings. The command-line utility is helpful when you need to automate the tunnel start and stop.
Both utilities support HTTP and HTTPS traffic. The desktop app works on Windows and Mac OS, and the command-line utility — on Windows, Mac OS, and Linux.
For complete information on setting up, configuring and using these utilities, follow the links above.
Organizations, whose users need multiple concurrent tunnels, can also set up and configure Enterprise Connection Manager. It is helpful when system administrators want better control over outgoing connections.
For information on connection types and other tunnel parameters, see Tunnel Settings.
Notes on tunnel functioning
The tunnel works with both HTTP and HTTPS traffic.
The tunnel connects to the
geo.tunnel.smartbear.comserver through port
443. It is important that proxies and firewalls running in your network allow connection to this URL and port.
However, if your organization uses the Enterprise Connection Manager, then the connection to this URL and port is needed for that Manager. The tunnels that users set up on their machines don’t need it.
Since the tunnel is working on your computer, all DNS resolutions occur on your machine (its hosts file is used).
It’s important for you to start the tunnel before running or creating your tests. See how you can do this.
A new tunnel you start with your credentials closes other tunnels you have started earlier.
If you need several tunnels working concurrently, you can assign names to them. A named tunnel is not closed when you create a new one with another name. This is helpful when your team wants to run several tests simultaneously. See Named Tunnels for details.
Some test devices running in the cloud treat the names
local, and the address
127.0.0.1in a special way (they can use them, for instance, for internal routing). This means that these names and this IP address might not work in your tests.
To refer to local resources, we’d suggest using the internal IP address of your machine. Alternatively, you can set up some alias for
localhostin the hosts file on your computer (that is, on the computer where the tunnel executable is running) and use this alias in your tests.
For information on using the tunnels in automated tests, see Using Tunnels in Automated Tests.
More on tunnels
Using Tunnels in Automated Tests