Socket
Socket
Sign inDemoInstall

browserstack-node-sdk

Package Overview
Dependencies
403
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    browserstack-node-sdk

Node SDK for browserstack selenium-webdriver tests


Version published
Maintainers
1
Created

Readme

Source

browserstack-node-sdk

Node SDK for browserstack selenium-webdriver tests

Running Jest, Mocha and Cucumber tests in multiple platforms using SDK

Add browserstack-node-sdk as a dev-dependency,

npm i -D browserstack-node-sdk
#or
yarn add --dev browserstack-node-sdk

Setup

npx setup --username userName --key accessKey
  • Adds a browserstack.yml file at root of your project with your auth keys BrowserStack Username and Access Key, browserstack configs and platforms. See sample config file here
  • Adds a new command for running tests on browserstack in scripts tag of package.json,
# before

"scripts": {
    # Jest tests
    "jest-test": "jest ...args",

    # Mocha tests
    "mocha-test": "mocha ...args",

    # Cucumber tests
    "cucumber-test": "cucumber-js ...args",

  },

# after

"scripts": {
    # Jest tests
    "jest-test": "jest ...args",
    "browserstack-jest-test": "browserstack-node-sdk jest ...args",

    # Mocha tests
    "mocha-test": "mocha ...args",
    "browserstack-mocha-test": "browserstack-node-sdk mocha ...args",

    # Cucumber tests
    "cucumber-test": "cucumber-js ...args",
    "browserstack-cucumber-test": "browserstack-node-sdk cucumber-js ...args"
  },

Run tests on browserstack by running

npm run browserstack-jest-test
# or
npm run browserstack-mocha-test
# or
npm run browserstack-cucumber-test

Sample test scripts are available in the jest-js-browserstack, mocha-browserstack & cucumber-js-browserstack repositories.

FAQs

Last updated on 14 May 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc