The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing


External Resources

More Info

Page tree
Skip to end of metadata
Go to start of metadata

Every Sauce Connect tunnel spins up a fresh virtual machine (VM) that is used only for your tests. Once the tunnel is closed, VMs are destroyed. As a best practice, we recommend you create a new tunnel for each test suite or build and tear it down at the end of your test. 

Starting New Sauce Connect Tunnels

Start a New Tunnel via Command-Line

You can launch a new tunnel from the command line of the machine where the Sauce Connect Proxy client is installed by copying the Run Command, which will include your authentication credentials. You can also add any Sauce Connect Proxy parameters you want to use in configuring your tunnel. 

See Basic Sauce Connect Proxy Setup for full instructions on launching tunnels.

Stopping Sauce Connect Tunnels (also known as Teardown Process)

Stop an Individual Tunnel via Command-Line

Once Sauce Connect has been terminated (typically via ctrl-c), a call will be made from Sauce Connect to the REST API with instructions to terminate the Tunnel VM. Sauce Connect will continue to poll the REST API until the Tunnel VM has been halted and deleted. 

NOTE: If you are using the Sauce Connect High Availability Configuration and attempt to terminate a running test with ctrl-c, you will see a message that Sauce Connect will not terminate until tests have completed. If you want to force Sauce Connect to terminate before the test finishes, enter ctrl-c again to force it to quit.

Stop an Individual Tunnel via Sauce Labs Dashboard

From your Sauce Labs dashboard, click Stop under the Actions column in the tunnel information table.

Stop All Tunnels in Your Account via Sauce Labs Dashboard

From your Sauce Labs dashboard, click Stop My Tunnels in the top-right corner of the page.

More Information