Code Monkey home page Code Monkey logo

nightwatchjs-browserstack's Introduction

nightwatch-browserstack

Waht is Nightwatch ?

Nightwatch is an automated testing framework for web applications and websites, written in Node.js and using the W3C WebDriver API (formerly Selenium WebDriver. It is a complete browser (End-to-End) testing solution which aims to simplify the process of setting up Continuous Integration and writing automated tests.

What is BrowserStack ?

BrowserStack is a cloud web and mobile testing platform that enables developers to test their websites and mobile applications across on-demand browsers, operating systems and real mobile devices, without requiring users to install or maintain an internal lab of virtual machines, devices or emulators.

BrowserStack Logo

This is a sample nightwatch project to run your functional tests programmatically on your local and also on cloud platform using BrowserStack.

Setup

  • Install node via brew install node Or download Node.js

  • Do git clone https://github.com/NageshJoy007/nightwatch-browserstack.git

  • To download required node_modules specified in package.json npm install

Run

Go into project folder and run below commands:

  1. To run tests using scripts in package.json

    nightwatch -e chrome --reporter html-reporter.js

  2. You can pass different nightwatch configurations/test settings to your tests run time from cli

    nightwatch -c ./conf/local.conf.js -e chrome --reporter html-reporter.js

  3. To run your tests using BrowserStack - Nightwatch Integration with BrowserStack

    • Get your browserstack account license for automation

    • 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>
      
    • Or Update browserstack.conf.js.conf.js files inside the conf/ directory with your browserstack-username and browserstack-access-key.

    nightwatch -c ./conf/browserstack.conf.js -e chrome --reporter html-reporter.js Or npm run test-bs-chrome

Output

* Reports will generate under tests_output folder.

nightwatchjs-browserstack's People

Contributors

nageshjoy007 avatar

Stargazers

Roman avatar

Watchers

James Cloos 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.