README
Testing via SauceLabs
This runs your local test via SauceLabs browsers/devices. You need to have a SauceLabs account.
Using:
- Karma via
@open-wc/testing-karma
- Testing via SauceLabs via karma-sauce-launcher
Setup
Manual
npm i --save-dev @advanced-rest-client/testing-karma-sl
- Copy karma.sl.config.js to
karma.sl.config.js
- Add these scripts to your package.json
"scripts": { "test:sl": "karma start karma.sl.config.js --compatibility all --coverage" },
Setup user + key
- Go to https://app.saucelabs.com/user-settings
- Look for "Access Key" and copy it
The SAUCE_USERNAME
variable is your login to SauceLabs and SAUCE_ACCESS_KEY
is the key you just coppied.
# for one time use only
export SAUCE_USERNAME=xxx
export SAUCE_ACCESS_KEY=xxx
# or add them to your .bashrc
echo "export SAUCE_USERNAME=xxx" >> ~/.bashrc
echo "export SAUCE_ACCESS_KEY=xxx" >> ~/.bashrc
# to verify, run:
echo "User: $SAUCE_USERNAME"
echo "Key: $SAUCE_ACCESS_KEY"
Usage
npm run test:sl