Skip to content

organich/jest-js-browserstack

 
 

Repository files navigation

JestJS BrowserStack

JestJS integration with BrowserStack for E2E functional testing of UI using Selenium and browserstack-node-sdk.

Run sample build


  • Clone the repository
  • Install dependencies using, npm install or yarn install
  • Set your BrowserStack Username and Access Key in browserstack.yml npx setup --username userName --key accessKey
  • To run sample test, run npm run sample-test or yarn run sample-test
  • To run tests on private websites,
    • set browserstackLocal: true at browserstack.yml
    • run npm run sample-local-test or yarn run sample-local-test

Integrate your test suite


  1. Install browserstack-node-sdk as a dev-dependency
npm i -D browserstack-node-sdk
or
yarn add --dev browserstack-node-sdk
  1. Setup
npx setup --username userName --key accessKey
  • Adds a browserstack.yml file at root of your mocha project with your BrowserStack Username and Access Key.
  • Adds a new command for running tests on browserstack in scripts tag of package.json,
"scripts": {
  "test": "jest ...args",
  "browserstack-test": "browserstack-node-sdk jest ...args"
},

Notes


Additional Resources


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%