Skip to content

Instantly share code, notes, and snippets.

@billmeyer
Last active August 17, 2020 15:46
Show Gist options
  • Save billmeyer/5cdb1ff770b0552ef0e49c49ba122d47 to your computer and use it in GitHub Desktop.
Save billmeyer/5cdb1ff770b0552ef0e49c49ba122d47 to your computer and use it in GitHub Desktop.
Sauce Connect for Desktop/Emulator/Simulator and Real Device *AUTOMATED* Testing

Starting Sauce Connect for Desktop/Emulator/Simulator and Real Devices

Get started by downloading the Sauce Connect executable from https://wiki.saucelabs.com/display/DOCS/Downloading+Sauce+Connect+Proxy.

See https://wiki.saucelabs.com/display/DOCS/System+and+Network+Requirements+for+Sauce+Connect+Proxy for network-specific requirements.

Prerequisites

These scripts expect that environment variables are set for SAUCE_USERNAME and SAUCE_ACCESS_KEY.

The value for SAUCE_ACCESS_KEY can be found by signing into https://app.saucelabs.com → Account → User settings → Access Key.

Starting a Sauce Connect Tunnel to the EU Data Center

  1. Copy the config.eu.yml example below to a file on your Sauce Connect server.
  2. Start Sauce Connect as follows:
sc --user=${SAUCE_USERNAME} --api-key=${SAUCE_ACCESS_KEY} \
      --config-file config.eu.yml

Starting a Sauce Connect Tunnel to the US Data Center

  1. Copy the config.us.yml example below to a file on your Sauce Connect server.
  2. Start Sauce Connect as follows:
sc --user=${SAUCE_USERNAME} --api-key=${SAUCE_ACCESS_KEY} \
      --config-file config.us.yml
logfile: "sc.eu.log"
pidfile: "sc.eu.pid"
log-stats: 60
se-port: 4021
metrics-address: "localhost:4022"
rest-url: "https://eu-central-1.saucelabs.com/rest/v1"
shared-tunnel: true
#tunnel-domains: ""
tunnel-identifier: "eu-tunnel-1"
verbose: 1
no-remove-colliding-tunnels: "true"
no-ssl-bump-domains: "true"
logfile: "sc.us.log"
pidfile: "sc.us.pid"
log-stats: 60
se-port: 5021
metrics-address: "localhost:5022"
rest-url: "https://app.saucelabs.com/rest/v1"
shared-tunnel: true
#tunnel-domains: ""
tunnel-identifier: "us-tunnel-1"
verbose: 1
no-remove-colliding-tunnels: "true"
no-ssl-bump-domains: "true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment