Sauce Connect Proxy Quickstart Guide
Please refer to Sauce Connect Proxy 5 Quickstart Guide for the latest quickstart guide.
Sauce Connect is required to run a local test on an app or website located behind a firewall. Get up and running with a basic Sauce Connect Proxy tunnel in minutes using the steps below.
What You'll Need
- A Sauce Labs account (Log in or sign up for a free trial license).
- The localhost URL for your site or app under test.
Start Tunnel
-
Download the Sauce Connect Proxy 4 client on your machine.
Always use the latest versionUsing older Sauce Connect versions may impact your ability to launch a tunnel or cause other technical issues. We recommend using the newer Sauce Connect Proxy 5 version.
-
Extract the .zip file and move the folder to your machine's home directory.
-
Open your terminal and navigate to the Sauce Connect Proxy client bin directory.
- Linux
- Windows
- Mac
cd sc-4.9.2-linux/bin
cd C:\sc-4.9.2-win32\bin
cd sc-4.9.1-osx/bin
-
Log in to Sauce Labs.
-
Go to the Tunnel Proxies page.
-
Under step 2, Authenticate & connect, copy the code snippet.
What is this?
This snippet contains your authentication credentials (username and access key), selects a Sauce Labs Data Center, and applies a name to your tunnel. Optionally, you can rename your tunnel by replacing the value after the--tunnel-name
flag. -
Paste the snippet into your terminal but do not run it. This snippet is for Sauce Connect Proxy 5, it can only be used to get your username and your access key.
-
Modify the snippet, see Sauce Connect Proxy 5 Migration Guide for more details.
sc -u <your-user> -k <your access key> --region <us-west|eu-central> --tunnel-name your_tunnel_name
Verify Connection
To confirm your tunnel is up, look for the confirmation message in your terminal:
Alternatively, you can check your list of active tunnels on the Tunnel Proxies page:
Run Test
With your tunnel up and running, try doing a Live local test.
- Cross-Browser
- Mobile Browser
- Mobile App
- From your terminal or IDE, launch a local instance of your website as you normally would.
- From Sauce Labs, click Live > Cross Browser > Desktop.
- In the URL field, enter your website's local URL (e.g.,
http://localhost:3000
). - From the Sauce Connect Proxy dropdown, select your tunnel name.
- Select your desired browser configuration.
- Click Start Test to launch your live test in Sauce Labs.
- From your terminal or IDE, launch a local instance of your site as you normally would.
- From Sauce Labs, click Live > Cross Browser > Mobile Virtual or Mobile Real.
- Enter the local URL for your local website under test (e.g.,
http://localhost:3000
) - From the Sauce Connect Proxy dropdown, select your tunnel name.
- Select your desired Mobile Virtual or Mobile Real device configuration.
- Click Start Test to launch your live test in Sauce Labs.
- From Sauce Labs, click Live > Mobile App.
- Click Upload App to upload your iOS or Android mobile app file to Sauce Labs.
- Find your app in the apps list, hover your mouse over it, and click Choose Device.
- To test your app on a real device, click Mobile Real. To test it on an emulator or simulator, click Mobile Virtual.
- Select your desired device configuration, including your tunnel name in the Sauce Connect Proxy dropdown.
- Click Start Test to launch your live test in Sauce Labs.
Stop Tunnel
When you've finished testing, you can stop your tunnel from the terminal where Sauce Connect is running by entering Ctrl+C.
Alternatively, you can go to the Tunnel Proxies page and click one of the Stop Tunnels buttons.