sls nightwatch-browserstack

Original boilerplate

Setup

  • Clone the repo

  • Install dependencies npm install

  • Set things up to work locally:

  • Set things up to work on Browserstack:

    • Set your BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY env vars (I dropped mine in .bashrc). These can be found by going to https://www.browserstack.com/automate/nightwatch, logging in, and search on the page for 'browserstack.user'.
    • Understand that we have a limited number of minutes on browserstack so don't go nuts. Otherwise, you're all set and can run the tests (see below).

Running your tests

These commands will run all the tests under tests/sls-react. As a reminder, if you're going to run the tests locally you have to have Selenium running too.

  • To run tests with firefox (default) locally, run npm run react_dev
  • To run tests with firefox and chrome locally, run npm run react_parallel_dev
  • To run tests with chrome on a random OS on browserstack, run npm run react_browserstack
  • To run tests with chrome, firefox, safari, and ie on random OS's on browserstack, run npm run react_browserstack_multi

Notes

Additional Resources