@chialab/rna-saucelabs-test-runner
v0.18.0
Published
A test runner for Saucelabs based on Web Test Runner.
Downloads
215
Readme
Install
npm i @chialab/rna-saucelabs-test-runner -D
yarn add @chialab/rna-saucelabs-test-runner -D
Usage
Start a saucelabs test runner based on the web dev server. It uses mocha but you still need to import an assertion library (recommended @open-wc/testing
).
Via import
import { test } from '@chialab/rna-saucelabs-test-runner';
/**
* @see https://modern-web.dev/docs/test-runner/cli-and-configuration/
*/
await test({
// files: ['...'],
}, {
// saucelabs username
user: '...',
// saucelabs access key
key: '...',
});
Via cli
test:saucelabs [options] [specs...]
Options:
-P, --port dev server port
--browsers [browsers...] saucelabs browsers list
--watch watch test files
--concurrency <number> number of concurrent browsers
--coverage add coverage to tests
--manual manual test mode
--open open the browser
-U, --user sauce username
-K, --key sauce access key
-h, --help display help for command
Samples
rna test:saucelabs
rna test:saucelabs 'test/**/*.spec.js' --coverage
rna test:saucelabs 'test/elements.spec.js' --browsers 'ie 11' 'chrome 60' 'ios 10.3'
License
RNA Saucelabs Test Runner is released under the MIT license.