Skip to content

kyungw00k/nightwatch-browserstack-example

Repository files navigation

Nightwatch-Browserstack-Example

Just another rendering test example project to run Nightwatch test on BrowserStack infrastructure.

Layout

nightwatch-browserstack-example
├── src/
├── test/
├── README.md                        # This file
├── base.nightwatch.conf.js          # base nightwatch configuration
├── local.nightwatch.conf.js         # to run tests on local machine
├── browserstack.nightwatch.conf.js  # to run tests on BrowserStack
├── browserstack.launchers.conf.js   # Browser lists to test
├── webpack.config.js
└── package.json

test/visual

Layout

visual
├── html/         # Rendering Test HTML
├── nightwatch/   # Custom commands for Nightwatchjs
├── reports/      # Test Report
├── screenshots/  # Test Resource
│   ├── baseline  # Expect
│   ├── diffs     # Diff
│   └── results   # Actual
└── spec/         # Test Case

Internal Test Procedure

  1. Boot up static server at port between 50000 and 59999
  2. Open each HTML file in test\visual\html
  3. Take page screenshot
  4. Compare to baseline
  5. Pass if the mismatch ratio is under 10%

Sample test

  • Run test on local: npm run test:visual:local
  • Run test on BrowserStack: npm run test:visual:ci

Resources

About

Just Another Nightwatch + BrowserStack Example

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors