A fully-automated testing rig #5

22nd Jul 2014

Part 5: Fun with viewports, and THEN some

As I described previously, we nicely externalised our list of viewport sizes, making it really easy to set our viewports for mobile, tablet and desktop tests. Our content appearance tests put this to good use, taking screenshots of the content at mobile, tablet and desktop resolutions. The problem we very quickly ran into was that we frequently ended up with empty screenshots, or sometimes no screenshot at all. This is where the asynchronous fun began.

The official walkthrough for CasperJS' "step stack" gives a very brief introduction to the idea that navigation...

Read more

A fully-automated testing rig #4

15th Jul 2014

Part 4: When TrueType doesn't fix everything

Two fonts walk into the bar, and the barman says, “Sorry lads, we don’t serve your type.”

It was a good day. I'd finished writing up the basic appearance tests for the first batch of content types, I'd road-tested them on my machine, we'd set up Jenkins… all was ready to go for our first run on the server. When we ran it, however, all the tests failed against the baseline.

Every single one.

Things started to get tense as it became clear that the solution was no trivial matter: we were experiencing...

Read more

A fully-automated testing rig #3

8th Jul 2014

Part 3: Using other scripts, datasources and directories

Earlier I described a bit about the scope of the project and how careful planning would be needed to keep the project growing smoothly. One result of this is our test template - a basic test script outline which most scripts should stick to - which makes test scripts easier to update because they all follow the same structure (yay standardisation!).

The template neatly gets most of the key setup/config variables from a config file in the utilities folder. This, though, was harder to get going than we thought thanks to some...

Read more

A fully-automated testing rig #2

2nd Jul 2014

Part 2: Setting up for a large project

When you take on a project it's a good idea to make sure you plan ahead. Testing platforms only remain useful as long as they're considered dependable - if it becomes too difficult to write tests which don't reliably execute you might as well not bother.

Here are a few key things I set up at the start to help the project along, which have all been hugely worthwhile investments:

1. A sensible directory structure.

It sounds like an obvious thing, but I had 25 content types to start with, and more...

Read more