- The Platform Configurator
- Getting Started with Selenium for Automated Website Testing
- Getting Started with Appium for Mobile Native Application Testing
- Selenium Bootcamp by Dave Haeffner
- Appium Bootcamp by Dave Haeffner and Matthew Edwards
If you have high availability turned on, you will get improved reliability and performance from Sauce Connect because running multiple tunnels in a tunnel pool will balance the tests between tunnels automatically. Learn more by visiting the High availability Sauce Connect Setup page.
Tunnel pools give transparent high availability: if a tunnel in the pool becomes unavailable, another tunnel in the pool will pick up its traffic, and connectivity will be restored automatically. Each tunnel counts toward your concurrency limit, but you can manage tunnels via the Saucelabs’ tunnel management page.
Pooled tunnels generally just work and don’t require user intervention. If you run a high number of tunnels, you may want to bypass the pool and specify which tunnel to use directly.
If you run a high number of tunnels in your pool, you may want to monitor each tunnel to make sure you can use Sauce Labs efficiently. If a tunnel is shut down (for example, because of user shutdown, crash, maintenance, or network partition), it will be taken out of the pool of active Sauce Connect instances.
If the tunnel was stopped, it needs to be restarted: tunnel pools only contain tunnels that you have started. Sauce Labs will not start a tunnel automatically for you, since tunnels count toward your concurrency limit.
One way to make sure your tunnel configuration stays up is to monitor individual tunnels in the pool. You can monitor each tunnel by running tests on a specific tunnel.
You can get the list of tunnel identifiers via the tunnel management page, or from your Sauce Connect logs.
Once you have that list of tunnels, you can start monitoring the tunnels in the pool by running tests on each of them individually. This is a good way to ensure that tunnels are all healthy & running.
How to Implement Monitoring
To specify which tunnel in the pool you would like to use, set the value
tunnelIdentifier in the desired capabilities for the test. The format looks like this:
<name>::sauce::<tunnel ID>. If the tunnel pool is not named (no
--tunnelIdentifier was used when starting Sauce Connect), you will not be able to specify the tunnel you want to monitor in this way. We recommend using tunnel identifiers.
For example, if the name is
my-production-tunnel and the tunnel ID is
0acd46dce4a711e5bbd068f72834b089, the desired capabilities would look like this:
This short Python snippet shows you how to monitor tunnels: