Multiple types of Testing

Nightwatch has extended its capabilities to beyond functional testing. Now you can perform visual regression testing, API testing & accessibility testing using Nightwatch.

Multiple types of testing

Visual Regression Testing

Nightwatch v3 introduces visual regression testing as an in-house plugin. The plugin takes care of

  1. Capturing screenshots
  2. Comparison with baseline to highlight visual differences using JIMP
  3. Report to review the differences
  4. Approve the changes

VRT can be done on real desktop & mobile browsers. Also, VRT can be run on components as part of component testing as well. Here is an example of how a VRT report looks like the visual differences highlighted.

VRT

API testing

API testing is an important aspect of software testing that ensures the reliability and functionality of an application's API layer, enabling developers to build robust and scalable software applications. API testing is now available with Nightwatch since v2.6.4. The following functionality can be achieved with API testing

  1. Request assertions
  2. Response assertions
  3. Viewing API tests in the HTML report
  4. Mock server

Accessibility testing

Nightwatch v3 packages the aXe-core package developed by Deque Systems as a plugin. It enables 90 different types of accessibility tests for WCAG compliance.