Main menu

A fully-automated testing rig #1

1 July 2014

A quick introduction

A few months ago I started my first project with CasperJS and PhantomCSS, and what an interesting experience it has been working through that to now our second, larger, automated testing setup. Being young projects, there are some fun quirks and niggles in CasperJS and PhantomCSS that I wish the world could have warned me about.

I'm working on an automated testing rig that will politely inform our team members when they inadvertently break certain designs or content functionality. The design side involves using CasperJS to go to a set of test pages, then having PhantomCSS take screenshots of specific content areas. In the -post script, PhantomCSS then compares all the screenshots against a set of 'baseline' screenshots. When the magic is complete, we have a lovely set of passes and fails passed through to Jenkins.

We now have it all automatically running, and are assessing how well it's working for us.

So here goes, a mini-series on CasperJS and PhantomCSS (mostly CasperJS) to both highlight some awesome bits and to offer some tips on working around some of the fiddly bits.

About the author

Nathan is a recent Masters of Computer Science graduate from the University of Warwick, and has lots of little chunks of experience in a variety of languages and arenas.
He is currently the main developer for our automated testing ambitions.