Test data is the information a team uses to try out software before real customers use it.
This guide is for students, people new to IT work and anyone who manages a team that builds or buys software. You do not need to write code to be affected: if a supplier tests your systems, your customers' details may end up in their test copies.
In short
- Teams need data to test software, and the quick shortcut is to copy the live customer database.
- Test systems usually have weaker locks and more people with access, so a copy of real data is easier to leak.
- A copied database can also carry the passwords and keys the live system uses.
- Safer options are made-up (synthetic) data or a copy where real details are swapped for fake ones before it arrives.
What you will learn
- Explain what test data is and why teams need it.
- Spot the risks of copying live customer data into a test system.
- Compare masked data and made-up data in plain words.
- Ask your team or supplier where their test data comes from.
- Live system (production)
- the real system that customers and staff use every day.
- Practice system (test environment)
- a separate copy of the software where a team tries out changes safely.
- Made-up data (synthetic data)
- realistic records created by a program, not taken from real people.
What is test data?
Think of a first aid class. Learners practise on a training mannequin, not on a real patient. Mistakes are fine, because nobody gets hurt.
Software teams work the same way. Before a change goes live, they try it in a practice system, called a test environment. The live system that customers use is called production. To test properly, the practice system needs records to work on: names, orders, addresses and payments. Those records are the test data.
The quick shortcut is to copy the live database into the practice system. It looks realistic, and it is quick to set up. But now real customers are lying on the practice table.
Where the comparison stops working: a mannequin is obviously not a person. A copied customer record looks just like a made-up one, so people stop treating it with care.
Why does it matter?
A US government security catalogue warns that live data in test systems can bring big risks. It says using personal details in testing makes misuse or leaks more likely.[1] Practice systems are often set up in a hurry. More people can open them, and they are checked less often.
If you are learning to build software
What could happen: you are handed a copy of real customer records to test your first feature.
Check this: ask whether the data is real, masked or made up before you open it.
If you hire a supplier to build or test your system
What could happen: the supplier copies your live database onto its own servers to test a change.
Check this: agree in writing what data the supplier may use and when it is deleted.
If you run a team that looks after databases
What could happen: a test copy keeps the live system's passwords, so a tester can reach the real database.
Check this: reset every password and key in a copy before anyone connects to it.
What does it look like?
Here is a made-up request in a team's task tracker, and the test copy it would create.
Example only. All values are made up.
TASK: Test the new loyalty points feature Request: copy last night's live database to TEST-02 (1) TEST-02 access: whole dev team plus two contractors (2) customers table in TEST-02 name: EXAMPLE Person email: [email protected] (3) app_settings table in TEST-02 mail_service_key: EXAMPLE-KEY-0000-FAKE (4) Delete after: (blank) (5)
- A full copy of every customer record, not just the few records the test needs.
- Many more people can open this practice system than the system customers use.
- In a real file, this line would contain a customer's actual name and email address.
- In a real file, this line would contain the key the shop's app uses to send emails. Tests could then email actual customers.
- Nobody has set a date to delete the copy, so it may stay for years.
Why this is risky: every person with access to the practice system can now see real customers' details. Database copies can also include the database's user accounts and their passwords.[2] The copy has no owner and no end date.
The safer way: the test uses made-up records. Or it uses a small copy, with names and emails swapped for fake ones before it arrives. Passwords and keys are replaced with test ones. The copy has an owner and a delete date.
How does it work?
There are three main ways to get test data. They carry very different levels of risk.
- Straight copy. The live database is copied into the practice system as it is. It is quick, but every real detail and stored password travels with it.[2]
- Masked copy. Real details are swapped for fake ones on the way, so "Jane Smith" becomes "Person 0042". This is called data masking (hiding real values behind stand-ins). It keeps the shape of the data while hiding who it belongs to.
- Made-up data. A program creates realistic records from scratch. This is called synthetic data. No real customer is involved.
- Check the result. Whatever the method, someone checks the practice system for real details, live passwords and links to live services before testers start.
- Delete on time. The test copy gets an owner and a delete date, and is removed when the test is done.

Be careful with words that sound safe. Some database tools hide values only on screen when someone looks them up, while the stored data stays the same. Microsoft says its version of this leaves the data in the database unchanged, and administrators can still see the original values.[3] A copy made from that database would still hold the real details.
Swapping names for codes is also not the same as making data anonymous. The UK data protection regulator says data with names swapped for codes can still be personal data. That is the case for anyone who holds the extra information linking the codes to people.[4]
A worked example
Vida Falk leads a small software team at a fictional online pharmacy. Her team is adding a new reminder feature that texts customers when a repeat order is due.
A new developer, Freya Gallardo, asks for test data. "Can I just copy the live database to the test server? It would only take ten minutes."
Vida thinks of the first aid class. Practising on real patients would be quick too, but nobody would agree to it. The live database holds health-related orders, home addresses and phone numbers. It also holds the key the app uses to send real text messages.
So Vida says no to the straight copy. Instead, they use a tool to make up a few thousand customers with fake names, fake addresses and phone numbers from a test range. The order patterns look like real life, but nobody in the data exists.
For one tricky bug, Freya needs data that matches a real edge case. Vida approves a small masked copy for that test only. Names, phone numbers and addresses are swapped for fake ones on the way. The text message key is replaced with a test key that cannot reach real phones.
Vida writes the copy's owner and a delete date in the task. Two weeks later, the test is done and the copy is deleted.
Freya says the made-up data was easier to work with anyway, because she could create exactly the cases she needed.
Myths and mistakes
| What people think | What is true |
|---|---|
| It is only the test system, so it does not matter. | Real data is just as personal in a test system, and test systems are often less protected.[1] |
| We hid the names on screen, so the copy is safe. | On-screen hiding can leave the stored data unchanged. A copy may still hold the real values.[3] |
| Replacing names with codes makes data anonymous. | If anyone can link the codes back to people, it is still personal data.[4] |
| A database copy is just customer records. | It can also carry user accounts, passwords and keys to live services.[2] |
| Made-up data is never realistic enough. | Good synthetic data can follow real patterns closely, and it lets testers create rare cases on purpose. |
What can I do this week?
- Ask your team or supplier where the data in each test system came from.
- List every test copy of live data, with an owner and a delete date.
- Delete any test copy nobody can explain or still needs.
- Agree that live passwords and keys are replaced before anyone uses a copy.
- Try a synthetic data tool on your next small test.
Checklist
- Made-up data is the first choice for testing.
- Any use of real data in testing is approved and written down.
- Real details are masked before the data reaches the test system, not after.
- Live passwords, keys and links to live services are replaced in every copy.
- Test systems holding real data are protected like the live system.
- Each test copy has an owner and a delete date.
- Suppliers follow the same rules, in writing.
Common questions
Is it illegal to use real customer data for testing?
Not always, but it needs care. Under laws such as the GDPR, personal data in a test system is still personal data. The same rules on purpose, security and deletion apply. Many teams find made-up or masked data is simpler. This is general information, not legal advice. See GDPR for Beginners.
What is the difference between masked data and synthetic data?
Masked data starts as real records, with names and other details swapped for fake ones. Synthetic data is created from scratch by a program, so no real person is in it. Masking keeps more real-life detail. Synthetic data removes the link to real people more fully.
Why do developers want live data?
Because it is quick and realistic. Live data has the messy, unusual cases that cause bugs, and copying it takes little effort. The better answer is to learn which cases matter, then mask a small sample or create those cases on purpose with made-up data.
Does a test copy need the same security as the live system?
Yes, if it holds real data. A US government security catalogue says test systems using live data should be protected at the same level as that data.[1] If the copy holds only made-up data, lighter controls may be fine.
What about the passwords inside a copied database?
Replace them before anyone connects. A copy can carry database accounts and the keys an app uses to reach other services. If a live key turns up in a test system, treat it as exposed and change it in the live system too. See Secrets Management for Beginners.
Where next?
Ready for the detail? Read the practitioner guide: Production Data in Non-Production. It goes further into refresh methods, resetting every password and connection that comes with a copy, and the checks to run before testers get access.
Also useful:
- Environment Separation
- Synthetic Data for Beginners
- Tokenisation for Beginners
- Anonymisation and Pseudonymisation for Beginners
- Data Minimisation for Beginners
Related NHI Mgmt Group resources: Data Masking vs Anonymisation vs Pseudonymisation · Synthetic Data Risk Guide · Data Masking and Tokenisation Buyer's Guide
Key terms
- Production environment
- The live system used by real customers and staff.
- Non-production environment
- A development, test or practice system that is not live, though it can still hold risky data.
- Test data management
- The controlled way a team creates and looks after safe, realistic data for testing.
- Data masking
- Hiding real values behind stand-ins so people can work with data without seeing the originals.
- Static data masking
- Permanently changing the real values in a copy before it is used elsewhere.
- Synthetic data
- Realistic records made by a program rather than collected from real people.
- Pseudonymisation
- Swapping names for codes while a separate key can still link them back to people.
Sources and further reading
- NIST SP 800-53 Rev. 5, Security and Privacy Controls for Information Systems and Organizations, control SA-3(2) Use of Live or Operational Data. National Institute of Standards and Technology. https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final, accessed 28 Nov 2026.
- pg_dumpall. PostgreSQL Documentation, The PostgreSQL Global Development Group. https://www.postgresql.org/docs/current/app-pg-dumpall.html, accessed 28 Nov 2026.
- Dynamic data masking. Microsoft Learn, Microsoft. https://learn.microsoft.com/en-us/azure/azure-sql/database/dynamic-data-masking-overview, accessed 28 Nov 2026.
- Pseudonymisation. Information Commissioner's Office (ICO). https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-resources/data-sharing/anonymisation/pseudonymisation/, accessed 28 Nov 2026.