Back
NoteApr ’232 min read

Make failure something you can cause

Uber Studio’s Stub tool replaced any service’s response with one you wrote, and kept saved stubs under the service they stood in for. The unhappy path only gets looked at when someone can switch it on.

Typeface

In Uber Studio, failure was something you could cause on purpose. A tool called Stub replaced any service’s response with one you wrote, so you could watch what the product did when a dependency failed. Pick a saved stub, activate it, and that service returns your error until someone turns it off.

A trip at Uber needed a rider, a driver, a route, a way to pay and a dispatch system willing to connect them. Without a simulator, testing one meant phones on desks, personal accounts and real cars driving real blocks to reproduce a bug. Making one service in that chain fail on cue, while you watched, was harder still.

Most teams test the path that works, because it’s the one they can reach. If failure can’t be caused on demand, the failure states get designed once and never looked at again. The error screen gets drawn, reviewed and shipped, and the next person to see it is a customer on a bad day.

The detail I’d keep from Stub is where it put them. Saved stubs wait in a list under the service they stand in for. Each fake sits next to the thing it fakes, so anyone who opens a service finds the failures people have already written for it, ready to switch on again.

Stub also shared one shell with Studio’s other tools: Simulate, Replay, Explore and Route. Running a trip and breaking a service it depends on were a tab apart. You could cause the failure and watch the product handle it without leaving the window.

Design teams can borrow this cheaply. Most design files keep their error states in a row off to the side of the happy path, where they’re reviewed once. Put them behind a switch in the prototype instead, on the real flow, and the failure gets looked at every time someone walks through it.