2. Quick Start

2.1. Selenium Tests

First do the following:

Replace {platform} in the following commands with one of: browserstack, saucelabs, crossbrowsertesting.

$ cp -r ./node_modules/cross-browser-tests-runner/samples/ samples/
$ ./node_modules/.bin/cbtr-server --native-runner --config ./samples/cbtr-{platform}-selenium.json

2.2. JavaScript Unit Tests

For any of the following sections first do the following:

2.2.1. Using In-built Native Runner

Replace {platform} in the following commands with one of: browserstack, saucelabs, crossbrowsertesting.

$ cp -r ./node_modules/cross-browser-tests-runner/samples/ samples/
$ ./node_modules/.bin/cbtr-server --native-runner --config ./samples/cbtr-{platform}-js-testing.json

2.2.2. Using Testem

NOTE: You need to have a testem.json with src_files or test_page setting.

Replace {platform} in the following commands with one of: browserstack, saucelabs, crossbrowsertesting.

$ ./node_modules/.bin/cbtr-quick-start -p {platform} -r testem
$ ./node_modules/.bin/cbtr-server &
$ testem ci

2.3. Common Steps

2.3.1. BrowserStack

$ export BROWSERSTACK_USERNAME=<your-browserstack-username>
$ export BROWSERSTACK_ACCESS_KEY=<your-browserstack-access-key>

2.3.2. SauceLabs

$ export SAUCE_USERNAME=<your-saucelabs-username>
$ export SAUCE_ACCESS_KEY=<your-saucelabs-access-key>

2.3.3. CrossBrowserTesting

$ export CROSSBROWSERTESTING_USERNAME=<your-crossbrowsertesting-username>
$ export CROSSBROWSERTESTING_ACCESS_KEY=<your-crossbrowsertesting-access-key>