Skip to content

Instantly share code, notes, and snippets.

@billmeyer
Last active July 30, 2020 18:04
Show Gist options
  • Save billmeyer/aa636d1f2f2f3eacd8b221656d2e1a11 to your computer and use it in GitHub Desktop.
Save billmeyer/aa636d1f2f2f3eacd8b221656d2e1a11 to your computer and use it in GitHub Desktop.
Sauce Connect for Real Device *LIVE* Testing

Starting Sauce Connect for Real Device LIVE Testing

NOTE: These instructions only apply to Real Device LIVE Testing. For Live Desktop, Automated Desktop, Automated Emulator, Automated Simulator, and Automated Real Device testing, a separate Sauce Connect instance is needed. Reference this Gist for details: https://gist.github.com/billmeyer/5cdb1ff770b0552ef0e49c49ba122d47.

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_LIVERDC_USERNAME and SAUCE_LIVERDC_ACCESS_KEY.

The value for SAUCE_LIVERDC_USERNAME can be found by signing into https://app.testobject.com → Account Settings (the head in the top right corner) → Username (at the bottom of the page).

Likewise, the value for SAUCE_LIVERDC_ACCESS_KEY can be obtained from the same page as the User API Key value.

Starting a Sauce Connect Tunnel to the EU Data Center

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

Starting a Sauce Connect Tunnel to the US Data Center

  1. Copy the config.us-liverdc.yml example below to a file on your Sauce Connect server.
  2. Start Sauce Connect as follows:
sc --user=${SAUCE_LIVERDC_USERNAME} --api-key=${SAUCE_LIVERDC_ACCESS_KEY} \
      --config-file config.us-liverdc.yml
logfile: "sc.eu-liverdc.log"
pidfile: "sc.eu-liverdc.pid"
log-stats: 60
se-port: 4011
metrics-address: "localhost:4012"
rest-url: "https://eu1.api.testobject.com/sc/rest/v1"
shared-tunnel: true
#tunnel-domains: ""
tunnel-identifier: "eu-liverdc-tunnel-1"
verbose: 1
no-remove-colliding-tunnels: "true"
no-ssl-bump-domains: "true"
logfile: "sc.us-liverdc.log"
pidfile: "sc.us-liverdc.pid"
log-stats: 60
se-port: 5011
metrics-address: "localhost:5012"
rest-url: "https://us1.api.testobject.com/sc/rest/v1"
shared-tunnel: true
#tunnel-domains: ""
tunnel-identifier: "us-liverdc-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