Skip to content
Test bookings on 110 devices, without ever really booking

Test bookings on 110 devices, without ever really booking

· Bert Altena

Two bugs were only found by a customer. After that came a robot that books like a guest on 110 emulated devices, with a screenshot per step, and never actually pays.

Two bugs in a booking form were only found by a customer. One: anyone booking in Safari from a different domain than the booking system lost their selection just before paying. The other: a window sat just off screen on a phone. On the builder's computer everything worked. After that came a test lab.

Booking like a guest

A test run opens the real page of a location, picks a period in the calendar, fills in the form up to the last step and then checks whether the Confirm and pay button is visible, in view, enabled and not covered. Every step gets a screenshot, every run a video.

Then come the checks a person rarely goes through in full. Is every departure day after the arrival? Does a pop-up belong to the spot you tapped? Is an occupied spot really impossible to choose? Is an empty or invalid email address refused? Does the price move when the stay gets longer? And recently also: does swiping back on a phone go one step back in the form instead of back to the calendar, and do the entered details stay?

Never really booking

The most important rule: nothing is ever booked, not even on the test environment. The robot only presses pay with empty or invalid details, to see that the form refuses them. The requests that would save something are blocked by its browser.

Whether saving would work, it asks the server read-only: does the server still know this visitor's selection? That is exactly where the Safari bug was. A bug that only occurs in the saving itself is therefore not seen by the test lab. That is a deliberate choice, which is why protection against a double booking lives in the server.

110 devices, divided sensibly

Every scenario on every device would mean thousands of runs. So a core set of five (two well-known phones and three browsers on a computer) runs every scenario. The other devices run the main scenario per language. On top of that, every device opens the homepage per language and scrolls all the way down, to catch script errors that real visitors report too.

Safari runs on a Mac. On Linux the Safari engine simply sends a cookie from another domain, the real Safari does not. On Linux the test would have missed the bug it had to find.

When it runs

  • After a deployment that touches the front end or the payment chain, but only once things have been quiet for an hour, and at the latest four hours after the first untested deployment. Five deployments in a row therefore give one run.
  • Every Monday night on the live site, with all devices and all languages.
  • By hand, whenever you like.
A run that looks right can be approved as the baseline. Later runs compare their screenshots with it and report when the picture differs strongly.

What I take from this

Test the path that earns money on your customers' devices, not on yours. And be honest about what a test does not see: an emulated iPhone is not a real iPhone. That is why measuring real visitors belongs alongside it, as in seeing where real visitors get stuck. Want a test lab like this for your own form? Have a look at the contact page.

Frequently Asked Questions

Is anything really booked during such a test?
No. The robot never presses Confirm and pay with valid details. No reservation, no invoice, no email and no money changes hands. Whether saving would work, it asks the server read-only.
Why do the Safari tests run on a Mac?
Because the Safari engine on Linux handles cookies from another domain differently from the real Safari. On Linux the test would miss exactly the bug it was meant to find.
Is an emulated device the same as a real phone?
No. It is a good approximation of screen size, touch and browser engine, but not a real iPhone. That is why measuring real visitors stays necessary alongside it.
Chat met ons