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.
Visual Regression Testing
Nightwatch v3 introduces visual regression testing as an in-house plugin. The plugin takes care of
- Capturing screenshots
- Comparison with baseline to highlight visual differences using JIMP
- Report to review the differences
- 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.
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
- Request assertions
- Response assertions
- Viewing API tests in the HTML report
- 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.