O'Reilly logo

Web Development Recipes, 2nd Edition by Chris Johnson, Mike Weber, Chris Warren, Brian P. Hogan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recipe 36Testing Web Interfaces with Nightwatch

Problem

Browser testing can be a tedious and time-consuming activity. In Recipe 35, Browser Testing with Selenium, we learned how to build tests using the Selenium IDE. Unfortunately, that limits our tests to Firefox. We want to make sure that we can test in all of the browsers that might be used to visit our site. Manually testing sites in multiple browsers would require having access to installations of every browser we want to test. We need a way to automate testing across multiple browsers without having to keep our own versions installed.

Ingredients

  • Node.js and npm[107]

  • Nightwatch[108]

  • QEDServer (for our test server)[109]

  • BrowserStack Trial account[110]

Solution

Nightwatch is an end-to-end ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required