O'Reilly logo

PhantomJS Cookbook by Rob Friesel

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

Setting up a fully covered project in CI with PhantomJS

This recipe puts together many of the preceding lessons and illustrates how to set up a build that will use PhantomJS for automated unit, end-to-end, and performance tests, ultimately failing the build if any test fails. Our demonstration will use Jenkins CI.

Getting ready

We must have the PhantomJS binary exposed to the CI server, which may not necessarily share the same permissions or PATH as our user.

Similarly, we need CasperJS installed and exposed to the continuous integration server.

Note

We covered how to install CasperJS in the Installing CasperJS recipe in Chapter 5, Functional and End-to-end Testing with PhantomJS. As with the PhantomJS binary, we must take care to ensure that CasperJS ...

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