GithubHelp home page GithubHelp logo

isabella232 / browserstack-integration-nodejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from browserstack/browserstack-integration-nodejs

0.0 0.0 0.0 51 KB

Integration to run your tests on BrowserStack

JavaScript 100.00%

browserstack-integration-nodejs's Introduction

NOTE: THIS PROJECT HAS BEEN DEPRECATED AND IS NO LONGER ACTIVELY MAINTAINED

  1. For accessing selenium-webdriver samples please refer to this repository.
  2. For accessing nightwatch samples please refer to this repository.

BrowserStack-Integration

Patches for Selenium scripts and test suites to run on BrowserStack when RUN_ON_BSTACK=true is set in environment. Currently supports Nightwatch.js.

BrowserStack Logo

NodeJS

Running the test

Installation

npm install browserstack-automate

Node script

  • To run locally, run npm link && cd examples/simple_sample/ && npm install && npm link browserstack-automate
  • To run on BrowserStack, run RUN_ON_BSTACK=true node sample.js

Nightwatch test

  • Add the following line in your configuration file: require('browserstack-automate').Nightwatch();

  • To run locally, run npm link && cd examples/nightwatch/ && npm install && npm link browserstack-automate

  • To run on BrowserStack, run RUN_ON_BSTACK=true ./node_modules/.bin/nightwatch -c conf.js

Configuring Tests

The following environment variables are supported,

RUN_ON_BSTACK - Boolean. To run your tests on BrowserStack
BSTACK_LOCAL - Boolean. Whether to start/stop BrowserStackLocal for your tests

BROWSERSTACK_USERNAME - your BrowserStack username
BROWSERSTACK_ACCESS_KEY - your BrowserStack accesskey

Setup

  • Clone the repo

  • Install dependencies npm install

  • Export the environment variables for the Username and Access Key of your BrowserStack account

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

To run tests

npm test

To integrate with your nightwatch framework

  • Add the following to conf.js file.
require('browserstack-automate').Nightwatch();

browserstack-integration-nodejs's People

Contributors

ankurgel avatar daneshqureshi avatar kalamcs avatar pulkitsharma07 avatar robinck avatar tomasz-oponowicz avatar tr4n2uil avatar varun-garg avatar vedharish avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.