Nightwatch.js

Focused, in-depth tutorials for Nightwatch.js, the Node.js-powered end-to-end testing framework. Articles cover everything from getting started to advanced patterns like TypeScript custom commands, the page object model, and third-party integrations. These articles fill in some gaps in the Nightwatch documentation and provide practical examples and guides — many including video lessons on automating real websites.

Learning concepts include:

  • Page Object Model pattern for maintainable test automation
  • TypeScript configuration for Nightwatch.js
  • Writing reusable and resilient tests with environment globals
  • Wiring with commercial cloud test execution services like SauceLabs
  • Performing accessibility testing (a11y, WCAG) as Nightwatch assertions

15 articles

Adding Custom Commands to Nightwatch TypeScript Projects

Adding Custom Commands to Nightwatch TypeScript Projects

Learn how to extend Nightwatch's built-in automation commands with your own when working inside a TypeScript Nightwatch test project in this post.
Best Websites for Practicing Test Automation

Best Websites for Practicing Test Automation

Looking for example demo sites to practice your test automation against with Selenium, Cypress, or NightwatchJS? Here is a list of the top demo websites for practicing your test automation skills against.
Add API Testing to your Nightwatch Test Automation

Add API Testing to your Nightwatch Test Automation

Learn how to add API testing to your existing selenium automated tests using the API testing plugin for Nightwatch.js
Automated Email Testing with Nightwatch and MailTrap

Automated Email Testing with Nightwatch and MailTrap

This handy guide will show you how to perform email testing in your end-to-end test automation to verify email delivery, recipient, localized content, or follow links out of account verification/activation emails in your Nightwatch selenium test suite using the MailTrap email sandbox tool.
Automated Visual Regression Testing Guide - Best visual tools, how, and when to use them

Automated Visual Regression Testing Guide - Best visual tools, how, and when to use them

Visual regression testing is a QA testing technique effective at catching look and feel or layout regression defects and catching bugs that you aren't explicitly looking for in your tests. These tests can be flaky or high maintenance without the right combination of visual testing tool, platform, and style so this guide will help you pick the best visual regression tool and write maintainable visual tests.
Using TypeScript to write Nightwatch.js Automated Tests

Using TypeScript to write Nightwatch.js Automated Tests

Nightwatch supports TypeScript! Learn how to write your Nightwatch automated tests and page objects using TypeScript with the examples in this documentation. Get the benefits of intellisense and type checking in both your tests and page objects!
Integrating TestRail with Nightwatch.js

Integrating TestRail with Nightwatch.js

Test case management systems that aren't integrated with your automation framework are wasteful. Learn how to integrate Nightwatch automated test results into TestRail automatically in this tutorial with the help of testrail-nightwatch-updater.
Using Nightwatch global variables to write tests that work everywhere

Using Nightwatch global variables to write tests that work everywhere

Learn how to use Nightwatch.js global variables so you don't need to hardcode values in your test automation allowing them to work in multiple environments and reduce test maintenance costs.
Implementing a Minimum Accessibility Test Plan

Implementing a Minimum Accessibility Test Plan

This tutorial will cover how to implement a minimum accessibility test plan against a website using Nightwatch.js and aXe.
How to use SauceLabs with Nightwatch.js

How to use SauceLabs with Nightwatch.js

Learn how to configure Nightwatch.js to use SauceLabs for scalable, parallelized, multi-browser automated test execution in this software testing tutorial.
South Florida Test Automation Meetup presentation for Getting started with NightwatchJS

South Florida Test Automation Meetup presentation for Getting started with NightwatchJS

Our local South Florida Test Automation chapter met virtually to go over the Nightwatch.js framework. It was our first virtual testing Meetup in an effort to adapt to the new normal.
Writing maintainable tests with Nightwatch.js page objects and commands

Writing maintainable tests with Nightwatch.js page objects and commands

Using page objects and commands for repetitive selectors and test code allows you to write maintainable automated test cases. Learn how in this Nightwatch automation tutorial.
Automated database testing with Nightwatch.js

Automated database testing with Nightwatch.js

When writing automated browser tests at the UI using frameworks like Selenium or Nightwatch.js it can be useful to validate your front-end interactions cause the desired changes in the backend database. This tutorial will show you how to use Nightwatch to write database tests against SQL databases.
Automated web accessibility testing with Nightwatch.js and axe

Automated web accessibility testing with Nightwatch.js and axe

There are quite a few web accessibility testing tools out there, but I thought I'd see if any could fit in with my existing automated Nightwatch tests.
Getting started with NightwatchJS

Getting started with NightwatchJS

I've been looking at newer browser automation frameworks that might also be written in NodeJS and Nightwatch was a match.