More than one tunnel, in parallel
Your account supports up to 2 simultaneous tunnels. They can be tunnels you start yourself or shared tunnels from team members on the same account.
Why use multiple tunnels?
Setting up tunnel identifiers
Use the --tunnel-identifier flag to give each tunnel a unique name.
java -jar testingbot-tunnel.jar key secret --tunnel-identifier myTunnel
Then specify the identifier in the desired capabilities of each test that should be routed through that tunnel:
{
"browserName": "firefox",
"browserVersion": "latest",
"platformName": "WIN11",
"tunnel-identifier": "myTunnel"
}
Parallel test isolation
When two test suites both rely on the tunnel (for example a staging suite and a QA suite), give each suite its own tunnel and identifier. This prevents one suite from saturating the other's bandwidth and makes monitoring per-suite traffic straightforward via the metrics endpoint.
High availability
You can start two or more identically-configured tunnels on different machines with the same identifier. TestingBot does not load-balance between them: when a test starts, it is routed through the most recently started tunnel with that identifier that is ready. The other tunnels act as standbys.
- A test keeps the tunnel it was given when it started. If that tunnel goes down mid-test, the test is not moved to another tunnel.
- When the newest tunnel is stopped cleanly (
Ctrl+Cor a plainkill <pid>), it is removed right away and the next tests use the newest remaining tunnel. - When the newest tunnel dies abruptly (killed, machine or network lost), TestingBot only notices after its health checks fail three times in a row, which can take around 15 minutes. Tests that start in the meantime can still be routed to the dead tunnel.
To split load across machines, give each tunnel its own identifier and point different test suites at different identifiers, as described in parallel test isolation.