About Nightwatch

Nightwatch was published in January 2014, initially created by Andrei Rusu as a tool to enable writing of automated UI tests in a straightforward way, and which will require as little configuration and additional libraries as possible.

Right after it was published, Nightwatch has seen steady growth and has now become one of the most popular Node.js end-to-end testing solutions for web applications and websites.

From the very first Github Issue opened by Evan You (creator of Vue.js) and seamless integration with the Vue.js framework, to being featured on the 2017 ThoughtWorks Technology Radar, Nightwatch has become an established household name in the wider automated testing industry.

Our Vision

Instead of building a highly flexible tool which supports a lot of plugins and customization we aim to deliver a tool that is packed with everything you need out of the box.

We believe that in order to write tests you should only focus on writing tests and not have to add multiple external plugins and dependencies. In our experience, this usually leads to increasingly more time spent on maintaining dependencies and solving configuration issues, instead of writing actual tests.

We do however provide mechanisms to extend the existing API commands and assertions when needed and you can also use Nightwatch programmatically if you wish. We also do our best to ensure that Nightwatch follows an industry agreed upon practice and we try to be compatible with other existing tools.

You can even write Node.js unit tests in Nightwatch to test your backend APIs. These tests are using the same assertion libraries and the same syntax and runner. We can even combine end-to-end tests with unit/integration tests in the same test run.

Roadmap

Current Version – 1.7

This version adds integrated support for the latest Microsoft Edge browser, improved parallelism support, and a few other features and improvements (such as making the API work with both chaining and promises).

Version 2

We are working towards releasing the next major version which will be built on top of the Selenium Webdriver, which will be making test run significantly more stable and more reliable.

We'll also add a few new capabilities, such as support for Chrome Dev Tools Protocol, file uploads, and a new APIs.

The Team

Andrei Rusu

Maintainer

Vaibhav Singh

Contributor

Ravi Sawlani

Contributor

Dharin Shah

Contributor

Binayak

Contributor

Harshit Agarwal

Contributor

Priyansh Garg

Contributor

Become a Contributor

Contributing to Nightwatch

Report any bugs or feature requests on GitHub. Please review the Contributing Guidelines before submitting a new issue.

Documentation

Issues with the documentation, such as inconsistencies, typos or mistakes can be reported on the Docs Github repository.

If you'd like to contribute API command examples, you can do so by adding them in this folder: github.com/nightwatchjs/nightwatch-docs/tree/main/api/method. These are automatically built into the individual API command pages.

For example, the clearValue page is built out of: github.com/nightwatchjs/nightwatch-docs/blob/main/api/method/clearValue.md.

Getting Assistance

On Github

You're encouraged to ask any questions you might have regarding the usage of Nightwatch or its APIs on the Github Discussions page. For reporting bugs, please submit a new Bug report on Github. Feature requests are also welcome.

New contributors: please also have a look at these resources:

On Discord Chat

We have setup a new chat server on Discord where you can chat with Nightwatch team members and other users. Please use this link to get in:
https://discord.gg/SN8Da2X

On Twitter

We are on Twitter at @nightwatchjs where we post updates about releases and other type of announcements.

On StackOverflow

In addition, there is a StackOverflow Nightwatch.js tag at your disposal.

Articles & Tutorials

A curated list of articles, guides, and video tutorials from the wider Nightwatch community. Please note that the videos and articles listed here aren't created by the Nightwatch team and we cannot guarantee their full accuracy.

Video

Why is (end-to-end) testing important (to me)?

Published on Mar 24, 2019 by Domenico Gemoli

Nightwatch collaborator Domenico explains why end-to-end testing (and also other forms of testing) is an important topic to him. A good explanation of the testing pyramid concept and a good introduction to automated testing.

Open-Source Projects

AWX by Ansible

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. AWX is built in Python and uses Nightwatch v0.9.

Worldview by NASA

Worldview is an interactive interface for browsing global, full-resolution satellite imagery. Built with React and using Nightwatch v0.9.

Feel free to tip us off about any articles or open source projects that we should list on this page.

Developer Experience

One of the core pillars of Nightwatch is to ensure developer delight. We always have one eye on trying to figure out how can we minimize friction accross your entire workflow from writing tests to running tests to debugging them.

Developer Experience

Writing tests

Intuitive APIs

Nightwatch's APIs are very intuitive and helps in authoring easy to understand and easy to maintain tests. Nightwatch supports a wide range of commands to interact with your website including complex interactions such as capturing network requests & setting Geolocation. Nightwatch intelligently handles auto-waiting so you don't have to break your head over it. Start Now

Rich & powerful selectors

The rich and powerful selectors combined with the ability to chain selectors makes finding elements very easy. Nightwatch supports the following selector types

  1. CSS selector
  2. XPath based selector
  3. Text based selector
  4. Role based selector
  5. Selectors based on other attribute such as placeholder text & alt text
  6. Finding inputs based on labels

Nightwatch Inspector

The Nightwatch inspector is a productivity tool for quick authoring of tests as you can quickly identify durable selectors with simple clicks, right within the browser itself!

Nightwatch Inspector

Running tests

Nightwatch is designed to run on real browsers and supports parallelism out of the box. Leverage the power of parallel execution on CI machines such as Jenkins & cloud infrastructure providers such as BrowserStack to achieve faster deployment times by shortening your feedback loops.

Debugging tests

Nightwatch comes with an in-built HTML report which gives a comprehensive environment level test execution summary & test level details. At a test level you can review each individual step. With DOM history you can inspect each element at every step of the test as it updated.

DOM History