Skip to content

The same test can mean something different tomorrow

Kevin Kissi

Kevin Kissi

· 2 min read
Code and data charts displayed on a laptop screen.
Photo by Daniil Komov on Unsplash (opens in a new tab)

A subscription renewal passes in staging on Monday. On Tuesday the same build reaches a customer whose renewal fails. An engineer can spend a long time comparing source code before noticing the most important difference. The staging account had always been active. The customer’s account had expired, been restored, and then changed plans between two billing events.

To the person clicking the button, both cases look like a renewal. To the systems doing the work, they have different histories. A test suite can cover every visible screen and still miss that distinction.

A renewal in two account histories. Record the starting state to explain which customers a passing renewal test covers.
Record the starting state to explain which customers a passing renewal test covers. Original explanatory figure.
Read the figure as text
Account A
Active plan → renewal requested · Expected behavior follows the current plan.
Account B
Expired → restored → plan changed · The effective date and pending payment can change the result.

Choose histories worth keeping

I’d start by asking what can change the answer to a business question. For a renewal that might include the current plan, the effective date of a price change, and whether an earlier payment is still pending. Those facts give us a small set of meaningful starting states. They’re more useful than dozens of accounts whose only difference is an email address.

Then preserve the starting state beside the result. A passing record should tell the next engineer which plan was active, which configuration was loaded, and what the downstream billing system reported. Very often the interesting difference between two runs is one of those details. Without it the team has to recreate the past while also trying to fix the present.

Time deserves a few cases of its own. What happens when two valid events arrive in the opposite order? What if a standing instruction changes after a job has been queued? Those are ordinary conditions for a system that has customers in different time zones and services that occasionally retry.

This is the part of enterprise QA I want to scale. Running more tests helps when those tests explore meaningfully different circumstances. A collection of carefully chosen histories gives engineers a way to explain which customers a result covers. When the next incident arrives, they can ask which assumption changed, instead of rerunning Monday’s test and wondering why it keeps passing.

Kevin Kissi

About Kevin Kissi

Engineering Leader

Subscribe

Stay up to date with my newest posts