talira

Nightwatch.js

Node.js end-to-end testing framework on the W3C WebDriver API

open sourceMITfree

Nightwatch.js is an end-to-end testing framework for Node.js that drives real desktop and mobile browsers through the W3C WebDriver protocol, and native iOS and Android apps too. npm init nightwatch sets up a project. Tests run in parallel across browsers by default and can be sent to a cloud grid such as BrowserStack or Sauce Labs. Beyond end-to-end tests it runs API tests, accessibility checks with axe, visual comparisons against baselines, and unit, component (React, Angular and others) and integration tests. An HTML reporter shows DOM history before and after each command, and a REPL lets you pause and try commands. It has been maintained by BrowserStack's open source program since 2021.

Problems it solves

  • write end-to-end browser tests in JavaScript that run on real browsers
  • run my web app's tests on real mobile devices through a cloud grid
  • test a native iOS or Android app with the same framework as my web tests
  • run browser tests in parallel across Chrome, Firefox and Safari
  • add accessibility checks with axe to my end-to-end tests
  • debug a failing browser test by seeing the DOM before and after each step

Features

  • W3C WebDriver end-to-end tests on real browsers
  • native iOS and Android app testing
  • parallel runs across browsers by default
  • cloud grid support (BrowserStack, Sauce Labs and others)
  • API testing
  • accessibility checks with axe
  • visual testing against baseline screenshots
  • unit, component and integration testing modes
  • HTML reporter with DOM history
  • debugging REPL
View 2 more
  • VS Code extension
  • record and replay with Chrome recorder

Alternatives

The same job

These do what Nightwatch.js does.

  1. WebdriverIO Open source test automation for web, mobile and desktop apps
  2. Selenium Automate any browser, from any language.
  3. Cypress AI writes the code. Cypress proves it works.
  4. Playwright Fast and reliable end-to-end testing for modern web apps
  5. BrowserStack Everything you need for testing, with AI at every step
  6. TestCafe A Node.js tool to automate end-to-end web testing

Compare Nightwatch.js with the top 3