Skip to content

Setup local env to run e2e tests on Saucelabs

Anton Olkhovskyi edited this page Mar 24, 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

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: To run the tests use npm run e2e:ci command. It will serve the application and execute all the e2e tests on the saucelabs against your local env.

Clone this wiki locally