Blog · What the tests missed

Test and real data shared one ID

Two environments with one record key mix their data, and launch day is when you find out.

In this seriesShow all 4 partsHide the list
  1. 01Every test passed. I'd never used my real voice
  2. 02It ran at 200 frames on my PC and 15 on a tester's
  3. 03Removing the app deleted its key
  4. 04Test and real data shared one ID

A desktop app I built went through a long test period before its real launch. A few days after launch, I opened my brand-new real profile and found 13 hours of activity on it, at stages it hadn't reached. I'd done those hours during the test period.

One ID Test Real

What happened

The app identified each profile by its name and nothing else. Nothing in that ID said which environment it came from. I'd used the same name in both places, so as far as the app could tell, the test profile and the real profile were one record.

Nothing flagged it. I noticed because the numbers on my own screen couldn't be right. It took a real person, using the same name on both sides of launch day, to show the problem.

The same mistake, three weeks earlier

A cousin of this bug had already come up. In October, a third-party add-on the app reads changed how it labeled its price history. The old label had the word "Beta" in it, and the new one didn't, so the test and real environments would have written to the same label after launch. We caught that one in time and filed each list under the install it came from.

Looking back, that was the moment to ask where else the app assumed it could tell the two environments apart.

The fix

Records are now split at the launch date, across six kinds of records, so nothing from the test period shows up as real activity.

Before your next launch

Walk through what happens to someone who already used the test version. They're the first people your launch reaches. And keep test and real data from sharing an identifier: put the environment in the ID, or better, keep them in separate databases.

Have something in mind?

Tell me what you're trying to do. I reply within two business days.

Get in touch