Recipe 36 | Testing 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 ...
Get Web Development Recipes, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.