Synthetic test data is made-up data that behaves like your real data: names, orders, invoices and appointments that look right to your software but belong to no actual person. You use it so your app can be tested properly without copying customers' records into a test environment. If your prototype has only ever been tried with a handful of hand-typed rows, or with a copy of real customer data, this is the gap to close before real users arrive.
I'm Hanad, a senior software engineer in Vienna. I rebuild stalled prototypes into maintainable code and build first real versions for founders. Test data comes up in almost every one of those projects, because it decides whether the first real users find the bugs or your tests do.
Key Takeaways
- Synthetic test data is artificial data that keeps the structure and relationships of real data, so you can test realistically without exposing real people.
- For software testing, the data has to be valid (correct formats, rules and links between records) more than it has to be statistically perfect.
- There are four common ways to make it: random generators, rule-based generation, masking real data, and models trained on real data. They differ in cost, realism and privacy risk.
- Check your data before you trust it: no broken links between tables, no impossible values, and edge cases such as empty fields and very long names.
- Synthetic data does not replace every real-data test. Reproducing a specific production bug often needs a masked copy of the real record.
Table of Contents
- What synthetic test data actually is
- Why a prototype needs it before real users do
- How synthetic test data is made
- What good synthetic test data must get right
- A worked example
- Checking whether your synthetic data is good enough
- When synthetic data isn't the right tool
- Who should set this up, and when
- What this looks like in a build with me
- Perspective
- FAQ
- Sources
What synthetic test data actually is
The UK government's guidance on synthetic data describes it as data that mimics the statistical properties, relationships and distributions of real data without being the real thing. In testing terms, think of a fake customer database that has the same columns, the same rules and the same messy variety as your real one, but where every person is invented.
Two neighbors are easy to confuse with it:
- Production data is what real users have entered into your live app. It carries privacy and legal obligations.
- Training data is what you feed a machine-learning model so it learns patterns. That is a different job. This article is about test data: the records your developer or your automated checks use to confirm that the app does what it should.
Synthetic data comes in degrees. A partly synthetic set swaps a small portion of a real dataset for invented values. A fully synthetic set contains no real records at all. For most small products, fully synthetic is the target.
Why a prototype needs it before real users do
Most Lovable, Bolt or Bubble prototypes I see were tested the same way: the founder clicked through with two or three fake accounts, and everything worked. Then real users arrived with long names, accents, empty fields, duplicate emails and thousands of rows, and screens started failing.
There are two separate problems here.
Realism. A test with five tidy rows proves almost nothing about an app that will hold five thousand messy ones. Synthetic data lets you generate volume and variety on demand: a customer with no phone number, an order with twelve line items, an invoice dated on a leap day.
Privacy. The shortcut is to copy the live database into a test environment. In Europe that is a real problem. A 2024 study in Empirical Software Engineering, built around the Norwegian National Population Registry, notes that GDPR prohibits using copies of production databases for testing and that masked or anonymized copies can still be vulnerable to linking attacks, where someone matches leftover details against other data to identify a person. If you serve doctors, lawyers or any business holding client records, this matters even more. Beyond the legal side, a test environment is usually less protected than production, so real records sitting there are a bigger risk than they look.
If your test environment is built from a restored copy of the live database, backup restore testing is worth reading alongside this, because the same copy-then-hide approach raises the question of what exactly ends up in staging.
My practical advice: never let real customer records become your test data by default. If you want the longer version of how a small team can manage this, I wrote a practical guide to test data management for small teams.
How synthetic test data is made
TechTarget's guide to synthetic test data lists four methods. Here they are in founder language.
| Method | What it means | Realism | Privacy risk | Effort |
|---|---|---|---|---|
| Random generation | A code library produces plausible names, emails and dates | Low to medium | Very low | Low |
| Rule-based generation | You define ranges and formats: prices between 5 and 500, a status from a fixed list, odd characters that can break forms | Medium, and you control it | Very low | Medium |
| Masking or anonymizing | You take real data and scramble or replace the sensitive fields | High | Higher, because it starts from real people | High |
| Generative models | A model learns patterns from a real data file and produces new rows | High | Depends on how it is built and checked | High |
The guide describes masking as the costliest approach but the most realistic, since it requires transforming the data through a pipeline before it can be used. It also names tooling, knowledge of the data model and programming skill as the main barriers for the people doing the testing.
For a young product, I'd start with the first two. Random generation fills your screens quickly. Rule-based generation lets you aim at the things that actually break: the maximum, the minimum, the empty value and the strange character. Models trained on production data are the right tool later, when you have a large real dataset, a data protection process and a reason to need that fidelity.
The "AI makes my test data" shortcut
It is tempting to ask a chatbot for a hundred fake customers. For a quick demo that is fine. Be careful when the data has relationships: orders must point at customers that exist, and invoices must add up. Language models produce rows that look right and still contain broken links, so you need the validity checks below either way.
What good synthetic test data must get right
A researcher survey, "Synthetic Data - what, why and how?", makes a point I find useful for software work: for testing, synthetic data need not be statistically correct, but it must be semantically correct. In plain terms, the data doesn't need to match your real customers' averages. It needs to follow the rules your software relies on. Think of it as the shape of the data rather than the exact mix.
That gives you a short checklist for your own data:
- Valid formats. Perforce, in its guidance on synthetic data, advises hunting for errors such as ZIP codes containing letters or negative account balances.
- Referential integrity. This means every link between records points to something that exists: no order belonging to a customer who isn't in the table. The same guidance says to ensure this holds across datasets.
- Business rules. An appointment can't end before it starts. A refund can't exceed the payment. A trial user can't have a paid invoice.
- Timing. The Norwegian registry study found it needed fresh synthetic data at least daily, because event timing (such as naming a newborn within a week of birth) affects business rules. Your app probably has similar clocks: trial expiry, payment retries, subscription renewals.
- Edge cases. Empty fields, very long strings, names with apostrophes or accents, the smallest and largest numbers, and the one account with ten thousand records.
Payments and logins are where I see this matter most. A checkout flow tested only with one successful card payment hasn't been tested. You want declined payments, expired cards, a refund, a user who signs up twice with different capitalization of the same email.
A worked example
Take an illustrative case: a physiotherapy clinic replacing its appointment spreadsheet with a booking tool. The clinic has 1,200 patients, six therapists and a few years of appointments.
The tempting approach is to import the spreadsheet as test data. That puts real health-related records into a test environment. The better approach is to generate:
- 1,200 invented patients with realistic but fake names, including some with apostrophes, hyphens and accents, and a few with no email
- Six therapists with different working hours, one on part-time leave
- Several thousand appointments that never overlap for the same therapist, with a share cancelled, rescheduled or marked as no-shows
- A handful of deliberately awkward records: a patient booked on the day clocks change, a therapist with 60 appointments in a day, a cancelled appointment with no reason entered
Now the developer can test double-booking rules, reminder emails and reports against realistic volume, and nothing in the test environment identifies a real patient. If a real patient reports a booking bug, the team can reproduce it with a made-up patient set up the same way.
Checking whether your synthetic data is good enough
You don't need a statistics degree. Three layers of checking work for most products.

Structural checks (every project). Run automated checks that fail the build when data breaks a rule: orphaned links, impossible dates, missing required fields. This catches most real problems, and it is cheap.
Behavior checks (most projects). Run your app's key flows against the data: sign up, pay, book, export. If the data is too clean, the app will pass and still fail with real users, so make sure the awkward cases from your edge-case list are in there.
Statistical and privacy checks (data derived from real records). If a model learned from your real data, the stakes change. Singapore's data protection commission, in its proposed guide on synthetic data generation, states that synthetic data isn't inherently free of re-identification risk. It recommends measuring utility by training the same model on synthetic and real data and comparing results. The UK guidance adds that poorly generated data can introduce unrealistic patterns, that synthetic data is just as vulnerable to bias and omission as real data, and that it should be documented and version-controlled.
The tension underneath is explained in the survey above: as fidelity goes up, privacy goes down. The closer your fake data mirrors real people, the more it needs to be protected like the real thing. For testing, that is a good reason to aim for valid and varied rather than a perfect replica.
The IEEE Standards Association's white paper, "Toward Practical Anonymity", adds that anonymity is a spectrum with no clean threshold, and that even differential privacy, a mathematical technique that limits what can be learned about any single person, isn't always sufficient on its own. The practical reading: if real records feed your generator, treat the output with care and get a data protection professional involved.
When synthetic data isn't the right tool
Synthetic data is built for new scenarios where no data exists yet, which is exactly the situation of a first version. It can't reproduce an exact production incident, though. When one real customer's record triggers a bug, you often need a masked version of that record to see what happened. Perforce's guidance says the same: use masking for debugging production incidents and pair it with synthetic data for other cases.
So the working rule for a small product is:
- Building and testing new features: synthetic.
- Load and volume testing: synthetic, generated at the scale you expect.
- Reproducing a specific production bug: a masked copy of the affected record, handled under your privacy rules.
- Features that use language models: a set of realistic test questions or documents, with your sensitive details redacted. See my notes on keeping raw personal data out of prompts and on protecting client data when AI is involved.
If your product includes an AI feature, the same principle applies to its quality checks. A hand-built set of test queries is the AI equivalent of synthetic test data, and I cover that in my RAG evaluation playbook.
Who should set this up, and when
Founders often ask whether this is something to do themselves with a generator tool. For a throwaway demo, a quick generator is fine. For anything that will hold customer money or personal data, the data needs to be designed alongside the database, because the rules (what's required, what links to what, what's allowed) live in the code. Whoever builds the app is best placed to build the test data with it, and the data should live in the repository you own, so the next developer inherits it.
What this looks like in a build with me
I build the first real version of a product, or rebuild a stalled prototype, at a fixed price in two to four weeks, and you own the code from the first commit. Work starts from a fixed-price Prototype Audit at €1,500, which takes three to five days and is credited against the build. Builds start from €12,000, and rescue rebuilds run €12,000 to €20,000. The price works because there is no agency overhead, no project-manager layer and no offshore markup: you speak to the senior engineer who writes the code.
If your Lovable, Bolt or Bubble prototype has only ever been tested with a few hand-typed records, or with a copy of real customer data, tell me what it does and where it breaks. You can see the offer and get in touch at hanadkubat.com.
Perspective
I think test data is the most underrated part of getting a prototype ready for real users. Founders put their budget into screens and features, and the thing that actually breaks the product on launch week is a record nobody imagined: a name with an apostrophe, a customer with no address, a payment that fails halfway.
My view is that test data should be built with the product, not bolted on afterwards. It belongs in the same repository as the code you own, so any developer who picks up the project can recreate a realistic database in minutes, with no real customer in it. That is part of why I use a deliberately boring, widely known stack: the next person should be able to read it, run it and trust it.
I also prefer valid and varied over perfect. You don't need a flawless statistical copy of your customers. You need data that follows your rules and pushes on every edge. And where real data is involved, I would rather keep it out of the test environment entirely than rely on someone remembering to hide it.
Hanad Kubat
FAQ
Is synthetic test data legal to use under GDPR?
Fully synthetic data that contains no real person's records generally avoids the problem of exposing personal data in testing. The Norwegian registry study notes that GDPR prohibits using copies of production databases for testing. If a generator learns from real records, the output still needs a privacy review, so ask your data protection officer or lawyer before relying on it.
What's the difference between test data and training data?
Test data is what you use to check that software behaves correctly. Training data is what a machine-learning model learns from. The same synthetic techniques can serve both, but the goals differ: for testing, valid structure and edge cases matter most.
How much synthetic test data do I need?
Enough to cover the realistic volume of your product plus the awkward cases. For a small business tool, that might be a few thousand records for volume checks and a short hand-written list of edge cases. Start small, check the results, then scale up.
Can I just use a chatbot to generate test data?
For a handful of simple records, yes. For linked data such as customers, orders and invoices, the rows may look plausible while links and totals are wrong, so run automated validity checks on whatever it produces.
Can synthetic data replace real data completely?
Not for every purpose. It is excellent for new features, volume tests and demos. Reproducing a specific production bug often calls for a masked copy of the real record, handled under your privacy rules.
Sources
- AI Insights: Synthetic Data, GOV.UK
- Application of deep learning models to generate rich, production-like test data, Empirical Software Engineering (Springer)
- Guide to synthetic test data, TechTarget
- Synthetic Data - what, why and how? (arXiv)
- Synthetic Data Generation: Use Cases, Challenges, & Benefits, Perforce
- Proposed Guide on Synthetic Data Generation, Singapore PDPC
- Toward Practical Anonymity: A White Paper on Privacy Risk, IEEE SA
- Backup Restore Testing: How to Prove Your Backups Work
