- Clone it
git clone git@github.com:jmarceli/jest-selenium-browserstack-example.git
cd jest-selenium-browserstack-example
- Replace
YOUR_BROWSERSTACK_USERNAME
with BrowserStack username andYOUR_BROWSERSTACK_KEY
with 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:local
Connect with BrowserStack manually:
~/.browserstack/BrowserStackLocal --key [YOUR_BROWSERSTACK_KEY] --folder $(pwd)
and then run tests with:
yarn test:manual
Just execute:
yarn test:automate
And 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:parametrized
Here is how you may run tests for multiple browsers in one call,
adjust configuration in ./test/config.json
and run:
yarn test:sequential
yarn build
For building tested code from src/
directory.
yarn clean
To remove lib/
directory generated with build
script.
yarn lint
Runs Eslint on files inside src/
directory.
author: Jan Grzegorowski