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

Our IPSec VPN solution provides your organization with a single, static tunnel, through which you can run manual and automated tests securely on Sauce Labs virtual and real devices. 

See the following sections for more information:

What You'll Need


  • Your organization's VPN client parameters must be configured with the Sauce Labs VPN. This must be done by our support team.
  • Authorization to use your organization's IPSec VPN tunnel. For more info, see Sharing IPSec VPN Tunnels.
  • Review IPSec VPN Network Requirements to ensure that your tunnel can support your desired number of concurrent sessions.
  • Your organization admin's name.
  • Your organization's IPSec VPN tunnel name.

Launching Tests Through IPSec VPN Tunnels

You can set an IPSec VPN tunnel connection for both manual and automated tests. Depending on the type of test you want to run, you may need to include certain desired capabilities in your test script.

Automated Testing

To connect to Sauce Labs real devices and virtual devices, assign your IPSec VPN tunnel to the appropriate Data Center Endpoint in your test script.

Appium and Selenium

  • Set the tunnelIdentifier desired capability to the name of your organization's IPSec VPN tunnel
  • Set the parentTunnel capability to the username of your Organization Admin

For example, let's say the name of your tunnel is AwesomeTunnel and your Organization Admin's username is john.smith. Here's how you'd define it in Java:

MutableCapabilities caps = new MutableCapabilities();
caps.setCapability("tunnelIdentifier", "AwesomeTunnel");

Espresso Tests on Emulators

Set the tunnel-identifier argument for Sauce-Runner-Virtual to the name of your IPSec VPN tunnel.

Live Testing

For Cross-Browser app testing, head to Live > Cross-Browser > Click Sauce Connect Proxy dropdown > Select your IPSec VPN tunnel.

For mobile device testing, to Live > Mobile-App > Choose your app from the list > Click Sauce Connect Proxy dropdown > Select your IPSec VPN tunnel.

Note About Public Real Devices

To ensure compliance with your company's settings and network policy, we recommend checking with your organization admin before running tests on virtual and real devices over an IPSec VPN connection. 

To run tests on public real devices in the Sauce Labs cloud using IPSec VPN, your organization admin must switch on Enable Sauce Connect Proxy/IPSec VPN for Public Cloud Devices, a security setting that is disabled by default. Once the setting is enabled, all users across your organization can run live and automated tests on public devices over IPSec VPN. Each time you initiate a test, you'll see a temporary pop-up alert window with a reminder that the utilization of a trusted IPSec VPN connection combined with RDC public real device tests may not be compliant with your organization's network policy. 

Troubleshooting IPSec VPN

To monitor tunnel stability, we recommend pinging the tunnel gateway or checking the status of the VPN connection from the IPSec gateway itself. 

Additional Resources