Skip to content

Setup local env to run e2e tests on Saucelabs

Sean Moore edited this page Nov 1, 2021 · 3 revisions

In order to create a connection from your local env to Saucelabs you need follow the steps below :

  1. Add the fake domain name sap.dev to your hosts file to target localhost. 127.0.0.1 sap.dev
  2. Add SAUCE_USERNAME and SAUCE_ACCESS_KEY variables to your env globally. In order to do that you can update your bash_profile file with this variables

(ALT: you can also go to the wdio.conf.js file and replace process.env.SAUCE_USERNAME and process.env.SAUCE_ACCESS_KEY with your credentials. Just remember to change it back before pushing your changes.)

In your terminal run sudo nano ~/.bash_profile
Add two variables to your bash_profile as follow:
export SAUCE_USERNAME='<Your_Sauce_Username>'
export SAUCE_ACCESS_KEY='<Your_Sauce_Access_Key>'

Note: You can find your Saucelabs credentials by login to the Saucelabs by SAP SSO authorization.

  1. Log in to saucelabs
  2. On the top-right menu select ACCOUNT => User settings
  3. Copy your User Name and Access Key This User Name and Access Key which need to be used as SAUCE_USERNAME and SAUCE_ACCESS_KEY accordingly.

Now you’re all set.

Clone this wiki locally