Different Environments (DEV, Test, Production)
Development (DEV) Environment
The DEV environment is where developers write and initially test their code. It changes frequently and is generally unstable, as new code is constantly being added.
Test/QA Environment
The Test (QA) environment is a more stable, controlled environment set up specifically for the QA team to execute formal test cases against builds that have already passed initial developer checks.
Staging Environment
The Staging environment closely mirrors production and is used for final verification, including UAT and performance testing, before release.
Production Environment
The Production environment is the live environment used by real end users. Extreme care is taken here, since any issue directly impacts customers.
Why Separate Environments Matter
Maintaining distinct environments prevents unstable, in-progress code from affecting real users, and allows testing to happen safely and thoroughly before each release.
How a Build Travels From DEV to Production
A change does not jump straight to users. It is promoted through environments, and each step acts as a gate.
- A developer finishes a feature, runs unit tests locally, and merges the code.
- The CI pipeline builds a versioned package and deploys it to DEV for quick checks.
- Once DEV looks stable, the same package is deployed to the QA environment. Testers run a smoke test first, then functional, regression and integration tests.
- Bugs go back to developers, a new build is produced, and the cycle repeats until exit criteria are met.
- The approved build moves to staging for UAT, performance runs and a final release rehearsal.
- After sign-off, the identical build is released to production and monitored closely.
The key word is identical. If a different package reaches production than the one QA tested, the testing effort loses much of its value.
What Differs Between Environments
| Aspect | DEV | QA / Test | Staging | Production |
|---|---|---|---|---|
| Main users | Developers | Testers | Testers, business users | Customers |
| Data | Dummy records | Planned test data | Masked copy close to real | Real data |
| Deploy frequency | Many times a day | Per build | Per release candidate | Per approved release |
| Integrations | Often stubbed | Sandbox versions | Same as production where possible | Live services |
Code stays the same across environments, while settings change. URLs, database hosts and API keys live in configuration so the build does not need recompiling. Automation suites follow the same idea:
# config/qa.properties
base.url=https://qa.example.com
db.host=qa-db.internal
payment.mode=sandbox
# run the suite against QA
mvn test -Denv=qa
Problems Testers Run Into
- "It works on my machine." A bug appears in QA but not in DEV because versions of libraries, browsers or database schemas differ. Always record the environment and build number in the bug report.
- Configuration drift. Someone tweaks a setting in staging by hand and forgets to apply it to production, so a release behaves differently live.
- Shared QA environment clashes. Two testers edit the same test account, or a developer redeploys mid-test run. Agree on deployment windows and keep separate test data per person.
- Real customer data in test. Copying production data without masking exposes personal information. Use masked or synthetic data.
- Testing in production by accident. Bookmarks and saved logins make it easy to open the live site. Use clearly different URLs and colour-coded banners where possible.
Before You Start Testing in Any Environment
- Confirm the build or version number deployed matches the one in the release notes.
- Run a short smoke test: login, a core transaction, and one integration.
- Check which database and third-party sandbox the environment points to.
- Make sure your test data exists and is not being used by someone else.
- Note the browser, device and environment name in every defect you log.
Ready to master real-world software testing?
Learn manual and automation testing hands-on with mentor-led sessions.