0% found this document useful (0 votes)
103 views2 pages

Nightwatch.js Testing Guide

Nightwatch.js is an end-to-end testing framework that allows testing of web applications in different browsers. To start testing with Nightwatch.js, one must install Nightwatch globally along with the Selenium standalone server. This installs the necessary drivers and allows running tests in Chrome or Firefox. A package.json file is also configured to download the Selenium server using a script.

Uploaded by

Julio Jardiolin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views2 pages

Nightwatch.js Testing Guide

Nightwatch.js is an end-to-end testing framework that allows testing of web applications in different browsers. To start testing with Nightwatch.js, one must install Nightwatch globally along with the Selenium standalone server. This installs the necessary drivers and allows running tests in Chrome or Firefox. A package.json file is also configured to download the Selenium server using a script.

Uploaded by

Julio Jardiolin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

How to start testing using Nightwatch.

js
([Link]

INSTALLATION
Steps:
1. Go to your terminal (cmd).
2. Create an empty directory and navigate to it.
3. Type npm init -y or yarn init -y The -y flag allows you to skip through the initialization questions.
A [Link] file will be created at the root of the current directory.
4. Type npm install -g nightwatch to install nightwatch
5. in order to be able to run the tests, we need to download the Selenium standalone server.
6. type npm install selenium-standalone --save-dev or yarn add -D selenium-standalone.
This command will install selenium-standalone and also save it to your [Link] file created
earlier.
7. Modify your [Link] file by adding this: ”e2e-setup”: “node_modules/selenium-
standalone/bin/selenium-standalone install” to the scripts property. The [Link] should look
more or less like this:

8. Running npm run e2e-setup or yarn run e2e-setup on the terminal will download the latest version
of selenium server, chromedriver, and geckodriver (this will be used for running tests in Chrome or
Firefox browser).
CONFIGURATION
Steps:
1.

You might also like