TestingBot Tunnel

Install our free Java based Tunnel.
Windows, Linux, BSD and OS X supported.

v.1.14 released December 15, 2013
Source code on GitHub
Maven groupId: com.testingbot | artifactId: TestingBotTunnel | version: 1.14

Whether you want to test on your local computer (localhost), on a staging server inside your LAN, or on a computer across VPN, our TestingBot Tunnel makes all of this possible in a secure and reliable way.

You will no longer need to open up ports on your firewall or whitelist our IP range to run tests on your staging environment.
Below are some of the features of the TestingBot Tunnel.

  • Fast: at our end of the tunnel we keep a cache of static content, to reduce traffic inside the tunnel.
  • Secure: when you start the Tunnel, a pristine VM server is booted just for you and will last until you end the tunnel.
  • Robust: full HTTP(s) support, coded in Java
  • Easy to set up and use.

Run tests in your local environment

The Tunnel makes it easy to run Selenium tests in your private staging environment.
You might want to test a new feature or refactor on your local code, to make sure all regression tests still pass.
With our Tunnel this is very easy to do, all you need to do is point your tests to http://localhost and port 4445 instead of using our grid http://hub.testingbot.com port 4444.

The Tunnel is a Java based program (jar) which contains our very own secure HTTP(s) proxy, which will relay requests to our grid.
This way a browser on one of our instances can easily fetch webpages through the tunnel.

Optimized for Speed

Setting up a Tunnel means booting a pristine VM server just for you. This takes about a minute to launch.
We added an accelerator on our end of the tunnel called Squid, which will cache static content flowing through the tunnel.
This optimisation will make the Tunnel fast because cached static content no longer needs to go through the tunnel.
Next to that, the tunnel has an option to use RabbIT proxy which compresses images, optimizes pages & more before sending the traffic through the tunnel!
The Tunnel uses zlib ssh compression to minimize the traffic going through the tunnel.
You can run multiple tunnels with 1 account. This means you can dedicate xx machines on your LAN to run xx tunnels.
With multiple tunnels, you do not have to worry about load issues when running xx tests in parallel.

Secure Tunnel

Every request to and from our servers will pass through the Tunnel, which is based on the SSH protocol.
A fresh VM is booted up just for you and when your tests are finished the tunnel and VM server will be destroyed.

Robust Tunnel

We've built a strong Tunnel which can handle a lot of traffic, even during parallel testing.
The Tunnel is built in Java with proven code and tests, runs on a standard JVM.
Both HTTP and HTTPS usage is supported inside the tunnel.
Starting the tunnel happens with a simple command on the commandline and offers options like verbose logging and fast-fail regexes.
Works on Mac, Linux, BSD and Windows.

Easy Setup

Setting up and using the Tunnel is easy.
Download the JAR file from our website and run it on your commandline:

All you need to do is replace the API_KEY and API_SECRET with your own key and secret.
You will see "You may start your tests" when your Tunnel is ready.

Below you will find some examples on how to use the Tunnel.


To start your Tunnel, download the Java based Tunnel and run from the commandline:

java -jar testingbot-tunnel.jar key secret
Below you will find an example demonstrating how to adjust your tests to use the Tunnel.

require "rubygems"
require 'testingbot' 
gem "selenium-client"
gem "selenium-webdriver"
require "selenium-webdriver" 
require "selenium/client"

caps = {
  :browserName => "iexplore",
  :version => "9",
  :platform => "WINDOWS"

urlhub = "http://key:secret@hub.testingbot.com:4444/wd/hub"
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120

webdriver = Selenium::WebDriver.for :remote,:url => urlhub , :desired_capabilities => caps,:http_client => client
webdriver.navigate.to "http://testingbot.com"
puts webdriver.title

require "rubygems"
require 'testingbot' 
gem "selenium-client"
gem "selenium-webdriver"
require "selenium-webdriver" 
require "selenium/client"

caps = {
  :browserName => "iexplore",
  :version => "9",
  :platform => "WINDOWS"

urlhub = "http://key:secret@localhost:4445/wd/hub"
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120

webdriver = Selenium::WebDriver.for :remote,:url => urlhub , :desired_capabilities => caps,:http_client => client
webdriver.navigate.to "http://staging.local"
puts webdriver.title

Notice how we now use localhost:4445, which will send the test commands through the Tunnel.


The following ports are available for localhost testing:
80, 888, 2000, 2001, 2020, 2222, 3000, 3001, 3030, 3333, 4000, 4001, 4040, 4502, 4503, 5000, 5001, 5050, 5555, 6000, 6001, 6060, 6666, 7000, 7070, 7777, 8000, 8001, 8080, 8888, 9000, 9001, 9090 and 9999.

To prevent certain websites or pages from being proxied by our tunnel, please use the fast-fail regex:

java -jar testingbot-tunnel.jar key secret -F "http://www.mywebsite.com/*"

If you are behind an HTTP proxy, please start the tunnel with these extra arguments:

-Dhttp.proxyHost=corporate-proxy.lan -Dhttp.proxyPort=8080

System Requirements

The system requirements depend on how you are going to use the tunnel.
If you intend to do parallel testing, you will need to increase the CPU and RAM of the machine running the tunnel.
By default, a machine with 4GB ram and 3GHz processor should be enough.

Tunnel diagram small

Tunnel Options

These options are available when launching testingbot-tunnel.jar:

usage: java -jar testingbot-tunnel.jar API_KEY API_SECRET [OPTIONS]
 -b,--boost                         				Will use rabbIT to compress and optimize traffic
 -d,--debug                                         Enables debug messages
 -f,--readyfile <FILE>                        This file will be touched when the tunnel is ready for usage
 -F,--fast-fail-regexps <OPTIONS>             Specify domains you don't want to proxy, comma separated.
 -h,--help                                          Displays help text
 -l,--logfile <FILE>                          Write logging to a file.
 -P,--se-port <PORT>                          The local port your Selenium test should connect to.
 -p,--hubport <HUBPORT<			            Use this if you want to connect to
                                                    port 80 on our hub instead of the
                                    				default port 4444
-q,--squid                         					Bypass our Squid proxy running on the tunnel VM.
 -s,--ssl                           				Will use a browsermob-proxy to fix self-signed certificates
 -v,--version                                       Displays the current version of this program