Every team that tests with fake data eventually finds a test record somewhere it should not be: a customer list with a placeholder name, a report whose totals include people who do not exist, a demo account sitting in the live system months after the demo. The records themselves are harmless. The trouble is that production systems cannot tell them apart from real customers, so they get emailed, counted and acted on.
Leaks are rarely exotic. They happen through a handful of ordinary accidents, and they are containable when the fake data is built to be recognised. This guide covers the classic leak paths, the markers that make records from the Fake Data Generator identifiable on sight, and the habits that keep a test set a test set.
Contents
- Quick answer
- The classic ways test records escape
- Markers that make fake data recognisable
- How to keep a test dataset contained, step by step
- Worked example: spotting a leaked record in an export
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
Test records leak into production through seed files that ship with fake rows inside, demo accounts nobody removes, and test runs pointed at live data. The defence is twofold: generate records that announce themselves, meaning emails on the reserved example.com, example.org and example.net domains and phone numbers in the fictional 555-01XX range, and keep the downloaded set in a labelled file that is never mixed with real exports. Generate with the Fake Data Generator, download the set as CSV or JSON, name it clearly as test data, and delete it when the test ends.
The classic ways test records escape
The first path is the seed file. A database seed or demo dataset is built for a staging environment, full of invented customers, and then the same file runs during a production deploy or a data migration. The rows arrive with plausible names and nothing flags them.
The second path is the demo account left live. A sample user is created in the real system so a feature can be shown or a screenshot taken, and nobody deletes it. It keeps its login, appears in user counts and shows up in every export.
The third path runs in the other direction and is the most damaging: someone pastes real customer data into a test because it was the nearest realistic sample. The test then does what tests do: it sends the welcome email, triggers the workflow, writes logs. Real people receive test mail, and real records end up stored in systems with none of production's safeguards. Recognisable fake data exists to prevent exactly this accident: a generated set is always at hand and never belongs to anyone.
Markers that make fake data recognisable
A leak you can see is a leak you can clean up. Records from the generator carry their origin in the fields themselves.
Email addresses use only example.com, example.org and example.net. Those domains are reserved and can never be registered, so no real customer has ever had one, and a search for those domains across a customer table finds every generated row in seconds. Phone numbers sit in the 555-01XX range, the block reserved for fictional use, and no real subscriber holds one. Names, addresses, usernames and companies are fabricated from small built-in word lists, producing combinations like 48 Placeholder Boulevard, Anytown that read as invented on sight.
Contrast that with hand-typed test data: an assistant's own email used "just for one test", a colleague's phone number, a famous person's name with a real domain. Those rows blend in perfectly, which is why they survive for years.
How to keep a test dataset contained, step by step
- Generate the set in the Fake Data Generator: choose the count (up to 200), tick the fields the test needs, and generate. Do not substitute real records for any field.
- Download the set immediately as CSV or JSON. The records are generated with cryptographic randomness and are not stored, so the download is the dataset; there is no copy to recover.
- Name the file as test data and store it apart from real exports, in its own folder, never inside a directory of genuine customer files.
- Load it only into the environment the test belongs to. If a row is ever needed in production for a demonstration, treat its removal as part of the same task, not a later chore.
- When the test ends, delete the dataset and sweep the target system for the markers: example-domain emails and 555-01XX numbers. Anything the sweep finds is a leak to remove.
Worked example: spotting a leaked record in an export
Suppose a customer export contains this row: Nina Notreal, [email protected], +1 555-0112, 48 Placeholder Boulevard, Anytown, username nina_notreal69, Demo Works LLC.
Three markers identify it as generated test data without opening any other system. The email domain, example.net, is reserved and unregisterable, so no real customer could have signed up with it. The phone number sits in the fictional 555-01XX range. The address pairs a street literally named Placeholder Boulevard with a town called Anytown, the signature of the word lists the record was assembled from. Any one marker would justify a closer look; together they settle it, and the row can be deleted and traced back to whichever test loaded it.
Limitations and honest tradeoffs
Recognisable markers only help if somebody looks. The generator cannot reach into your database and flag its own rows; the sweep in step 5 is a human habit, not a feature. The markers also depend on using the generated values as they come out: edit a generated email onto a real domain and the row loses its clearest sign.
The word lists are small, so names repeat across large batches and combinations can look odd. For testing that is fine, and the repetition is itself a tell. There is no seed or save feature, so two runs never produce the same set, and an undownloaded dataset cannot be recreated. Any resemblance to a real person is coincidence, since every field is fabricated. And the generator deliberately produces no credit card or ID numbers, so payment-related testing still belongs in a provider's sandbox rather than in a generated dataset.
Common mistakes
- Seeding production from a staging file. The seed that was safe in staging carries its invented customers into the live database. Keep seed data per environment.
- Creating a demo account and forgetting it. A sample user left live stays in counts, exports and search results. Delete it in the same session that creates it.
- Pasting real data into a test "just this once". The test sends real mail and writes real records into unsafe places. Generated data is faster to get than the cleanup.
- Mixing generated rows into a real export. The combined file looks uniform, travels further, and the fake rows become unfindable. Keep the sets in separate, labelled files.
- Editing generated values to look more realistic. Changing an example.net email to a real domain removes the marker that makes the row safe to spot later.
FAQs
How can I tell a test record apart from a real one in a database? Look for the markers the generator builds in: an email on example.com, example.org or example.net, which are reserved domains no real customer can use, and a phone number in the fictional 555-01XX range. A row carrying either marker is test data.
What is the risk if a few test rows sit in production? They get treated as real. Reports and counts include them, mail merges and campaigns can target them, and a leftover demo account stays open for anyone to find. The tidy-up cost is small; the cost of acting on invented customers is not.
Can I save a generated dataset and reuse it safely? The generator has no seed or save feature and stores nothing, so download the set as CSV or JSON at generation time. Keep that file labelled as test data and store it apart from real exports, so its origin is never in doubt.
Why did the same names appear twice in one batch? Records are fabricated from small built-in word lists, so names and combinations repeat across large batches. For testing that is harmless, and the repetition is another visible sign that a row was generated rather than collected from a real person.
Is it safe to top up a real export with generated rows for a bigger test set? No. Mixing is how leaks become invisible: once generated rows sit inside a real export, nothing distinguishes them at a glance, and the combined file tends to travel. Keep generated data in its own labelled file from creation to deletion.
Conclusion
Test records will always try to wander; the goal is to make them easy to catch when they do. Generate records whose emails and phone numbers cannot belong to anyone, keep the downloaded set labelled and separate, and sweep for the markers when a test ends. The Fake Data Generator supplies the recognisable records; the containment is the routine around it. The companion guide covers the constructive side, generating fake addresses to test a checkout flow, and the rest of the series sits under Security and Privacy Utilities guides.
References
- RFC 2606, on the reserved example domains that can never be registered: https://www.rfc-editor.org/rfc/rfc2606
- North American Numbering Plan Administrator, on the 555-01XX range reserved for fictional use: https://www.nanpa.com/