User:Wood.vi/sandbox/Nightwatchjs (Software)

Nightwatch.js

Introduction

 What Is Nightwatch?

Nightwatch.js is an integrated framework for performing automated end-to-end testing on web applications and websites, across all major browsers. It is written in [Node.js][1] and uses the [W3C WebDriver API][2] to interact with various browsers.

It is a complete end-to-end and cross-browser testing solution and it aims to simplify the process of writing and running various types of tests, including:

 end-to-end tests on all major web browsers unit tests of Node.js services integration tests of HTTP APIs  Nightwatch was created in 2014 in Amsterdam, The Netherlands, and the name was inspired by the famous painting [The Night Watch](https://www.rijksmuseum.nl/en/collection/SK-C-5) by Dutch 17th century artist [Rembrandt van Rijn](https://www.rembrandthuis.nl/en/meet-rembrandt/). The masterpiece is prominently displayed in the Rijksmuseum, in Amsterdam. Read more about how Nightwatch was created [here][4].

 How Does It Work?

Nightwatch is distributed as an easy to use CLI tool and has built-in support for all major browsers: Chrome, Firefox, Safari, and Edge.

Nightwatch performs the browser automation by taking advantage of the industry standard protocol **WebDriver**, which is defined as a W3C standard specification.

![Theory of Operation][image-1]

 What is WebDriver? 

Nightwatch uses internally the [W3C WebDriver API][6] to perform the browser automation related tasks, like opening windows or clicking links.

[WebDriver][7] is a general purpose library for automating web browsers, part of the [Selenium][5] project. It is now a [W3C specification][10] which standardises browser automation, providing a reliable and consistent protocol to remotely control web browsers via a restful **HTTP API**.

Created more than a decade ago, **Selenium** is by far the most widely used project in the automated testing industry, providing a comprehensive set of tools for browser automation, initially written for Java but now with support for most programming languages.

 Browser Support

WebDriver is implemented by all major browser vendors as a W3C compliant HTTP service.

 Nightwatch &amp; Selenium Server

Nightwatch can also be used for distributed cross-browser end-to-end testing at scale together with the [Selenium Server][13] (also known as **Selenium Grid**), which is an open-source project written in Java that manages a network of WebDriver nodes.

Nightwatch also can be integrated with cloud-based testing platforms like [Browserstack][14], [SauceLabs][15], [CrossBrowserTesting][16], or [LambdaTest][17].

![Selenium Server Operation][image-2]

<p class="secondary-text">Nightwatch is sometimes inaccurately described as a "Selenium binding" library. While it's true that Nightwatch can be (and is often) used together with the [Selenium Server][18] it's important to remember that Nightwatch is a complete testing solution which contains a built-in CLI test runner, an extendible command and assertion library, and support for page object model.

[1]:	https://nodejs.org/ [2]:	https://www.w3.org/TR/webdriver/ [3]:	https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol [4]:	/about [5]:	https://selenium.dev/ [6]:	https://www.w3.org/TR/webdriver [7]:	https://www.w3.org/TR/webdriver [8]:	https://sites.google.com/a/chromium.org/chromedriver/ [9]:	https://github.com/mozilla/geckodriver [10]:	https://www.w3.org/TR/webdriver/ [11]:	https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol [12]:	/gettingstarted/installation/#webdriver-service [13]:	https://selenium.dev/downloads/ [14]:	https://www.browserstack.com/ [15]:	https://saucelabs.com/ [16]:	https://crossbrowsertesting.com/ [17]: https://www.lambdatest.com/ [18]:	https://selenium.dev/downloads/ [19]:	https://selenium.dev/downloads/

[image-1]:	/img/operation.png [image-2]:	/img/operation-cloud.png

History
Nightwatch.js was initially created in Oslo, Norway by Pineview.io – an independent software consultancy; it is now being maintained at BrowserStack with help from all our contributors.