Local website testing
Setting up TestingBot Tunnel
Setting up TestingBot Tunnel requires Java (JRE) to be present. The minimum version is JRE 8.
If you are looking to run the Tunnel with Docker, there's a Docker image available as well: testingbot/tunnel
Downloading TestingBot Tunnel
The tunnel comes as a .jar
file, which needs to be executed with the command line.
You can download the file from the TestingBot Tunnel documentation.
Running TestingBot Tunnel
Once downloaded, you'll need to open a terminal and navigate to the folder where the downloaded .jar
file resides.
To start the tunnel, you'll need to make sure you have obtained the key
and secret
from the TestingBot dashboard.
These 2 secret values are required, as the Tunnel needs to communicate with the TestingBot API.
When you've retrieved the credentials, you can start the Tunnel:
java -jar testingbot-tunnel.jar KEY SECRET
You'll need to replace KEY
and SECRET
with the values you obtained.
You should see output from this command, similar to the example below:
TestingBot Tunnel v3.2
Questions or suggestions, please visit https://testingbot.com
----------------------------------------------------------------
Aug 23, 2022 1:49:27 PM com.testingbot.tunnel.App setJettyPort
INFO: Setting up Local Proxy Port 65453
Aug 23, 2022 1:49:30 PM com.testingbot.tunnel.PidPoller <init>
INFO: Pid file: /Users/xxx/projects/web/public/downloads/testingbot-tunnel/testingbot-tunnel.pid
Aug 23, 2022 1:49:30 PM com.testingbot.tunnel.App boot
INFO: Please wait while your personal Tunnel Server is being setup. Shouldn't take more than a minute.
When the tunnel is ready you will see a message "You may start your tests."
Aug 23, 2022 1:49:32 PM com.testingbot.tunnel.App tunnelReady
INFO: Successfully authenticated, setting up forwarding.
Aug 23, 2022 1:49:33 PM com.testingbot.tunnel.proxy.ForwarderServlet addProxyHeaders
INFO: [GET] http://127.0.0.1:4445/
Aug 23, 2022 1:49:33 PM com.testingbot.tunnel.proxy.TunnelProxyServlet$TunnelProxyResponseListener onComplete
INFO: [GET] http://127.0.0.1:2010/squid-internal-periodic/store_digest (200) - 2 ms
Aug 23, 2022 1:49:33 PM com.testingbot.tunnel.proxy.TunnelProxyServlet$TunnelProxyResponseListener onComplete
Aug 23, 2022 1:49:33 PM com.testingbot.tunnel.App tunnelReady
INFO: The Tunnel is ready, ip: 109.68.165.150
You may start your tests.
Aug 23, 2022 1:49:33 PM com.testingbot.tunnel.App tunnelReady
INFO: To stop the tunnel, press CTRL+C
Important: you need to run the Tunnel on a machine (pc, server, VM, ...) which has access to the public internet and which has access to the environment you want to test with TestingBot.
Stopping TestingBot Tunnel
To stop the tunnel, you can send a CTRL+C
key combination, which will gracefully stop the process.
Or you can send a KILL
signal to the Tunnel's PID
which will stop the process gracefully.
Note: we do not recommend hard killing the process, as that might cause some resources to not be cleaned up properly, causing a bad state.