2026-11-15
Your Test Data Is Lying to You
A form passed every test we threw at it. Name, address, phone number, all saved correctly. Then a real customer signed up with the last name "O'Brien" and the whole registration failed with a database error.
Nothing about the code had changed. The tests had simply never used a name with an apostrophe. Our test data was "John Smith, 123 Main Street" over and over, and the software had learned to pass the exam it was given.
Clean data tests the happy path of the data
Most test data is tidy because tidy data is easy to write. Real data isn't. Real people have names with apostrophes, hyphens, accents, and single letters. They have addresses with apartment numbers, unusual formatting, or no street number at all. They paste text with trailing spaces, emoji, and line breaks. They leave optional fields empty and mandatory ones surprisingly creative.
When every test uses the same polite, well-formed input, you're verifying that the feature works for data that was never going to cause trouble.
What I add to my test data now
For any field that accepts input, I keep a small set of awkward values ready: empty and whitespace-only strings, very long text, special characters and quotes, non-English characters, numbers at and just beyond the allowed limits, and dates at the edges, like leap days and month ends. None of this is exotic. Each one has broken a real product somewhere.
I also try to use production-shaped data wherever it's allowed, anonymized and scrubbed. Volume matters too. A page that loads instantly with ten records can crawl with ten thousand, and a test environment with a tiny dataset will never show you that.
Data is a testing decision
It's easy to treat test data as setup, something to get out of the way before the real testing starts. But the data decides what the tests can possibly find. A thorough test running on bland data is still a bland test.
These days, when a feature "passes," one of my first questions is: passed with what data? The answer often tells me more than the green checkmark does.