Book Image

Deploying Node.js

By : Sandro Pasquali
Book Image

Deploying Node.js

By: Sandro Pasquali

Overview of this book

Table of Contents (14 chapters)
Deploying Node.js
About the Author
About the Reviewers

Automated browser testing with PhantomJS and CasperJS

One way to test whether a UI is working is to pay several people to interact with a website via a browser and report any errors they find. This can become a very expensive and ultimately unreliable process. Also, it requires putting potentially failing code into production in order to test it. It is better to test whether application views are rendering correctly from within the build process itself prior to releasing any views "into the wild". PhantomJS was created to address this need, among others.

A browser, stripped of its buttons and other controls, is, at its heart, a program that validates and runs JavaScript, HTML, and CSS. That the validated HTML is rendered visually on your screen is simply a consequence of humans being able to see only with their eyes. A server can interpret the logic of compiled code and see the results of interactions with that code without a visual component. Perhaps because eyes are usually found in one...