- Clone it
git clone git@github.com:jmarceli/jest-selenium-browserstack-example.git cd jest-selenium-browserstack-example- Replace
YOUR_BROWSERSTACK_USERNAMEwith BrowserStack username andYOUR_BROWSERSTACK_KEYwith BrowserStack key in files insidetest/directory - Run selected tests (see scripts section below) and/or modify source
For more information head to https://www.grzegorowski.com/integration-tests-with-jest-selenium-and-browserstack/
Run Jest Selenium tests locally with:
yarn test:localConnect with BrowserStack manually:
~/.browserstack/BrowserStackLocal --key [YOUR_BROWSERSTACK_KEY] --folder $(pwd)and then run tests with:
yarn test:manualJust execute:
yarn test:automateAnd see tests automatically connecting and running on BrowserStack.
To run tests against browser and OS specified as command execution arguments use:
BROWSER=chrome OS=Windows yarn test:parametrizedHere is how you may run tests for multiple browsers in one call,
adjust configuration in ./test/config.json and run:
yarn test:sequentialyarn buildFor building tested code from src/ directory.
yarn cleanTo remove lib/ directory generated with build script.
yarn lintRuns Eslint on files inside src/ directory.
author: Jan Grzegorowski