By Xav

← Writing

The field I leave alone

Imagine an order form where picking a product gives you a quantity of one. How would you test it?

My first impulse is to send an order with a product and a quantity, then check what the server saved. That’s a reasonable test of the server. But I’ve just supplied the very thing I wanted to check.

One order, two ways

For the first order, I’d open the form, pick a product, and press Save. I’d leave the quantity field alone. Then I’d open the saved order and check the product and quantity. That catches both a blank field that blocks submission and a form that looks right but sends the wrong value.

For the second order, I’d pick the same product and change the quantity to three. A server that always saves one could pass the first test. It takes a customer changing their mind about how many they want to expose that mistake.

I like this pair when moving a form to a new interface. One order tells me the customer can accept the suggestion. The other tells me it really is a suggestion.

All posts →