Development, test and production are three separate places where the same app is built, checked and used.
This guide is for new developers, students and small teams who keep hearing "dev", "test" and "prod". You do not need to write code to be affected: if your business pays someone to build an app or website, how they keep these places apart decides how safe your customers' data is.
In short
- Development is where people build, test is where they check, and production is the live app real customers use.
- A mistake or break-in in development or test should stay there, as long as the places are kept apart.
- Shared passwords, shared keys and copies of real customer data are the usual ways the places get joined up.
- Give each place its own account and keys, use made-up data outside production, and release changes through one checked path.
What you will learn
- Explain what development, test and production mean in one sentence each.
- Spot a test system that is quietly joined to the live one.
- Check where your team's test data comes from.
- Ask a supplier how changes reach your live app.
- The places (environments)
- separate copies of an app's computers, settings and data, each used for one job.
- The live app (production)
- the version real customers use, holding real data.
- Moving a change (release or deployment)
- copying a finished change from test into the live app.
What are development, test and production environments?
Think of a theatre. Actors learn their lines in a rehearsal room. They run the dress rehearsal on the real stage with no audience. Only then comes opening night, with paying guests in every seat.
Software works the same way. Each of these places is called an environment: a set of computers, settings and data used for one job.
- Development (often "dev") is the rehearsal room. Developers write code and try ideas, and things break often.
- Test is the dress rehearsal. Testers check that changes work before customers see them. Some teams add a final stop called staging, which is set up to look as close to the live app as they can make it.
- Production (often "prod") is opening night. Real customers use it, and it holds real data.
A change moves from development, to test, to production, one step at a time. A US government security checklist asks teams to check changes in a separate test environment first. It should be kept apart so that test work does not affect the live system.[1]
Where the comparison stops working: a rehearsal room has its own door. Software environments can look separate but still share hidden links, such as the same password or the same customer data. Then a problem in the rehearsal room can spill onto the real stage.
Why does it matter?
Development and test are often less well guarded than production. If they share keys or data with it, they can become a back door in.
Microsoft said that in late 2023 an attacker guessed the password of an old, non-production test account. The attacker then used that account's permissions to reach a small share of Microsoft's corporate email, including senior leaders' mailboxes.[2] Read our Microsoft Midnight Blizzard breach page for the full story.
If you are learning to code
What could happen: you test against the live app "just once" and delete or change real customer records.
Check this: before you run anything, look at which environment your settings point to.
If you pay someone to build your app
What could happen: your supplier copies your customer list into a test system that few people protect.
Check this: ask whether your real customer data is ever used outside the live app.
If you run a small team
What could happen: everyone has full access to the live app, so one tired click can take it offline.
Check this: list who can change production today, and whether they all need to.
What does it look like?
Many apps keep a small settings file for each environment. Here is a made-up pair for a florist's online shop. Both files point at different places, but they hide a problem.
Example only. All values are made up.
# settings for the TEST shop APP_URL=https://test.shop.example.com DB_HOST=db-test.example.invalid DB_PASSWORD=FAKE-Tulip-0000 (1) CUSTOMER_DATA=copy-of-live-customers-FAKE (2) # settings for the LIVE shop APP_URL=https://shop.example.com DB_HOST=db-live.example.invalid DB_PASSWORD=FAKE-Tulip-0000 (3)
- In a real file, this line would contain the test database password.
- In a real file, this line would point the test shop at a copy of the live customer list.
- In a real file, this line would contain the live database password, here the same as the test one.
Why this is risky: anyone who reads the test settings also holds the key to the live database. The test shop also holds real names and addresses, but it may be guarded far less well. The same checklist says that if live data is used before production, the test place should be protected to the same level as that data.[1]
The safer way: each environment gets its own passwords and keys, kept in a secrets store rather than in the file. The test shop uses made-up or masked data. Masked data means real records with names and details swapped for fake ones.
How does it work?
Here is how a change usually travels in a team that keeps its environments apart.
- Build. A developer writes the change in development, using made-up data and keys that only work there.
- Check. The change moves to test, where people and automatic checks try to find faults.
- Approve. Someone reviews the result and agrees it can go live.
- Release. An automatic release tool, often called a pipeline, copies the change into production. Many teams let only the pipeline do this, not people's laptops.
- Watch. The team watches the live app, and can roll back (return to the last good version) if something goes wrong.

Cloud providers suggest one simple way to keep the places apart: a separate cloud account for each environment. Amazon Web Services explains that separate accounts keep each environment's resources and data apart by default. A problem in one is then less likely to spread to the others.[3]
Code hosting services can help too. GitHub lets a team name its environments, such as "staging" or "production". It can ask for approval before a job releases to one of them. That job can only read the environment's secrets once its rules have passed.[4]

A worked example
Elif Osei runs Heron Florist, a fictional flower shop with an online store. A freelance developer, Kofi Zeller, looks after the site.
Kofi wants to add a new delivery-date picker. On his laptop he builds it in development, with a dozen made-up customers called things like "Test Person 1".
Next he moves the change to the test shop. Elif tries to order flowers there with a fake card number. She finds that the picker lets her choose a Sunday, when the shop is closed. Kofi fixes it in development and sends it through test again.
While he works, Elif asks a question she read about. "Is the test shop using a copy of our real customer list?" Kofi checks. It was, from a quick copy he made last spring. It also shared the live database password.
Elif remembers the theatre. The dress rehearsal should not need the box office keys. Kofi changes the live password so it is no longer the same as the test one. He deletes the copied customer list from the test shop and loads made-up records instead.
When the picker passes test, Elif clicks "approve". The release tool copies the change into the live shop. Kofi watches the first few real orders come in, ready to roll back.
The whole change takes three days. The fix to the test shop takes one afternoon, and it means a leak there would no longer expose Heron Florist's customers.
Myths and mistakes
| What people think | What is true |
|---|---|
| Test systems do not matter, because nothing real is there. | Test systems often hold copied data or shared keys. Treat them as a possible way into production.[2] |
| A copy of real data makes the best test. | Made-up or masked data usually works for most tests. If real data is needed, it needs approval and the same protection as production.[1] |
| Giving the test and live systems different names keeps them apart. | Names are labels. Separate accounts, networks and keys are what keep them apart.[3] |
| Developers need full access to production to fix things fast. | Most changes can go through the release pipeline. Emergency access can be approved, recorded and time-limited. |
| Old test systems can be left running in case we need them. | Forgotten systems are rarely watched or updated. Switch them off, or keep them in the list of things you protect. |
What can I do this week?
- List your environments, including any old test or demo systems you no longer use.
- Check whether any password or key works in more than one environment.
- Ask where the data in your test systems came from.
- Write down who can change production, and remove anyone who does not need to.
- Switch off test systems nobody uses any more.
Checklist
- Development, test and production are separate, ideally in separate cloud accounts.
- Each environment has its own passwords, keys and service accounts.
- Secrets live in a secrets store, not in settings files.
- Test systems use made-up or masked data, and any use of real data is approved and protected.
- Changes reach production only through a release pipeline with an approval step.
- Only a few named people have direct access to production.
- Emergency access is approved, recorded and time-limited.
- Unused test, demo and old systems are switched off or kept on the list of things you protect.
Common questions
What is the difference between test and staging?
Both are places to check changes before they go live. Test is often used for everyday checks by developers and testers. Staging, where a team has it, is a final stop that looks as much like production as possible. That way the last checks are close to real conditions.
Can a small team manage with just two environments?
Yes, many small teams use one place for building and checking, and a separate production. What matters most is that the live app is kept apart, with its own keys and real data that stays there. Add more steps as the app and team grow.
Is it ever fine to use real customer data in test?
Only rarely, and with care. A US government security checklist says live data before production should be approved, recorded and controlled, and protected to the same level as in production. Made-up or masked data is usually the safer choice. See Test Data for Beginners.
Why should developers not have full access to production?
Fewer people with access means fewer ways in for a mistake or an attacker. Changes can still go live through the release pipeline. For emergencies, we suggest access that is approved, recorded and switched off again after a set time.
Are environments only for big companies?
No. A one-person website can still have a test copy and a live site. Cloud and hosting services often make this cheap or free to set up, and it keeps your customers away from half-finished work.
Where next?
Ready for the detail? Read the practitioner guide: Environment Separation. It goes further into account and network separation patterns, developer access to production and the audit evidence that teams are asked for.
Also useful:
- Deployment Environments
- CI/CD Pipeline Security for Beginners
- Change Management for Beginners
- Secrets Management for Beginners
Related NHI Mgmt Group resources: APT29 (Midnight Blizzard) Threat Actor Profile · Ephemeral and Preview Environment Security Guide · Non-Human Identities for Beginners
Key terms
- Environment
- A set of computers, settings and data used for one job, such as building, checking or running an app.
- Development
- The environment where developers write and try new code.
- Test
- The environment where changes are checked before they go live.
- Staging
- A final check environment set up to look as much like production as possible.
- Production
- The live environment that real customers use, holding real data.
- Pipeline
- An automatic tool that checks a change and releases it from one environment to the next.
- Masked data
- Real records with names and personal details swapped for fake ones.
Sources and further reading
- NIST SP 800-53 Rev. 5, Security and Privacy Controls for Information Systems and Organizations: CM-4(1) Separate Test Environments and 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.
- Microsoft Actions Following Attack by Nation State Actor Midnight Blizzard. Microsoft Security Response Center, 19 January 2024. https://www.microsoft.com/en-us/msrc/blog/2024/01/microsoft-actions-following-attack-by-nation-state-actor-midnight-blizzard, accessed 28 Nov 2026.
- Organizing Your AWS Environment Using Multiple Accounts: Benefits of using multiple AWS accounts. Amazon Web Services. https://docs.aws.amazon.com/whitepapers/latest/organizing-your-aws-environment/benefits-of-using-multiple-aws-accounts.html, accessed 28 Nov 2026.
- Deployment environments. GitHub Docs, GitHub. https://docs.github.com/en/actions/concepts/workflows-and-actions/deployment-environments, accessed 28 Nov 2026.