Book Image

PhantomJS Cookbook

By : Rob Friesel
Book Image

PhantomJS Cookbook

By: Rob Friesel

Overview of this book

Table of Contents (15 chapters)
PhantomJS Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


Of all the places where PhantomJS has emerged as a compelling solution, the most powerful is perhaps in the realm of continuous integration. Since PhantomJS is a completely headless browser, it is extremely simple to install and operate on most systems—there is no fussing with X virtual framebuffer (Xvfb) and no need for binding to virtual machines. The PhantomJS binary is simply available on the host, and instances can be launched on demand from whatever jobs request them.

In this chapter, we will learn how to use PhantomJS as part of our continuous integration (CI) strategy. The chapter will survey ways of reporting test failures in CI systems as well as how to fail builds when front-end tests don't pass.