This plugin integrates TestCafe with the SauceLabs Testing Cloud.
npm install testcafe-browser-provider-saucelabs
Before using this plugin, save the SauceLabs username and access key to environment variables SAUCE_USERNAME
and SAUCE_ACCESS_KEY
, as described in SauceLabs documentation.
You can determine the available browser aliases by running
testcafe -b saucelabs
If you run tests from the command line, use the browser alias when specifying browsers:
testcafe "saucelabs:Chrome@beta:Windows 10" 'path/to/test/file.js'
When you use API, pass the alias to the browsers()
method:
testCafe
.createRunner()
.src('path/to/test/file.js')
.browsers('saucelabs:Chrome@beta:Windows 10')
.run();
Use the following environment variables to set additional configuration options:
-
SAUCE_JOB
- the text that will be displayed as Job Name on SauceLabs, -
SAUCE_BUILD
- the text that will be displayed as Build Name on SauceLabs. -
SAUCE_OPTIONS
- Additional Job options as JSON. See SauceLabs Test Configuration for a full list.
Developer Express Inc. (https://devexpress.com)