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.
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.
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 ...