What a test environment is, the types teams use from dev to staging, which tests run where, how to set one up step by step, and how to keep shared environments stable, with a readiness checklist.
A test environment is where your team tests software before release: a controlled copy of the setup it will run on in production. Take an online store getting release 4.2 ready: the team needs somewhere stable for its test execution before shoppers see the new checkout. This guide covers the types of test environments, their components, how to set one up, how a test environment differs from staging and production, and how to keep shared environments healthy, with a readiness checklist at the end.
What is a test environment?
A test environment is a dedicated, controlled setup of hardware, software, network, configuration, and test data where a team runs tests before release. It mirrors production closely enough that results can be trusted, but it is isolated, so failures don't reach real users.
A few related terms come up in the same conversations:
- QA environment: the shared test environment where the QA team runs functional, regression, and exploratory tests on a candidate build.
- Test bed: often used as a synonym (see the difference below).
- Test environment management: the practice of provisioning, booking, refreshing, and monitoring environments so teams can trust them. It's one part of test management.
Here's how that looks for the online store's release 4.2, a web release that replaces the three-step checkout with a single-page checkout and lets signed-in shoppers save a card. All names and values are illustrative.
- Development: each developer's local setup plus a shared dev server, with mocked payment responses.
- QA: build 4.2.0-rc1, a seeded product catalog, test shopper accounts, and the payment provider in sandbox mode.
- Staging: the release candidate on production-sized infrastructure and production configuration, with a masked copy of production data and two intentional differences: a test email inbox and the tax calculation service in test mode.
- UAT: a stable copy of staging where the product team signs off the new checkout against the acceptance criteria.
- Production-like (performance): production-sized servers for a performance smoke test of checkout before the go decision.
Test environment examples
Example 1: a web app login page
To test the login page of a web app, a typical environment includes:
- Operating systems: current and previous major versions of Windows and macOS.
- Browsers: Chrome, Edge, Firefox, and Safari, using the versions your analytics show customers on. See cross-browser testing.
- Database: the same engine and major version as production, holding anonymized test accounts (valid, locked, expired, and unverified).
- Middleware and services: the same web server and authentication configuration as production, and an email service in test mode for password reset.
- Tools: a test management tool to record results, a defect tracker, and an automation framework if the checks are automated.
Example 2: an API or microservice
For the store's checkout service, the environment might be:
- The checkout service build under test, running in a container.
- A containerized Postgres database seeded with test orders and customers.
- The payment provider's sandbox and a mocked shipping API.
- Environment variables that point each dependency to its test endpoint.
See API testing for the checks that usually run here.
Example 3: mobile
For mobile web or a native app, the environment is a device list rather than one machine: real devices for the models and OS versions your customers use most, plus emulators or simulators for fast checks during development. Choose devices from your own analytics, not every model on the market. Mobile testing covers the device strategy in more detail.
Why test environments matter
- Trustworthy results: a defect found in a production-like environment is a real defect, not a setup artifact.
- Isolation: tests can create, break, and delete data without affecting customers.
- Repeatability: the same build, configuration, and data give the same result, which is what regression testing and automation depend on.
- Release confidence: you can say which environments a release was tested on and what passed in each.
Even a close replica differs from production. Real traffic, real third-party behavior, and real data volumes differ, so plan production monitoring alongside pre-release testing.
Types of test environments
Type | Purpose | Typical tests | Usually owned by | How close to production |
|---|---|---|---|---|
Development | Write and check code | Unit and component checks | Developers | Low |
Integration | Wire services together | API and contract checks | Developers or QA | Medium |
QA or test | Shared functional testing | Functional, regression, exploratory | QA team | Medium |
System | Test the full build end to end | System testing | QA team | Medium to high |
Performance or load | Measure speed and capacity | Load, stress, soak | Performance engineers | High for infrastructure |
Security | Find vulnerabilities safely | Scans and penetration tests | Security team | High |
UAT | Business users validate the release | Acceptance against criteria | Product or business team | High |
Staging or pre-production | Dress rehearsal of the release | Smoke, final regression, release checks | DevOps or release team | Highest |
Ephemeral or preview | Short-lived copy per branch or pull request | Fast functional and integration checks | The CI/CD pipeline | Varies |
Development environment
This is where developers write code and run unit tests before handing a build to testers. It's usually a local machine or a shared dev server with minimal configuration, so it changes constantly and isn't the place to judge release readiness.
Integration testing environment
The integration environment brings modules and services together: front end and back end, databases, and external APIs. It's where integration testing checks that the pieces talk to each other correctly, often with mocks for services that aren't ready.
QA environment
The QA environment is the shared space where testers run functional, regression, and exploratory tests on a candidate build. It's refreshed for each release, and its data is reset often enough that tests start from a known state.
System testing environment
Here the whole application is tested as one integrated system. System testing validates end-to-end behavior against the requirements, so this environment needs every component deployed, not just the ones that changed.
User acceptance testing (UAT) environment
A UAT environment resembles production as closely as practical. End users or business stakeholders confirm the software meets their needs and the acceptance criteria. It should stay stable during UAT, so avoid deploying new builds mid-session without warning.
Performance testing environment
This environment measures how the software behaves under heavy traffic, high load, or extended use. Its infrastructure should match production in size and configuration, or results won't predict production behavior.
Staging environment
Staging is the final pre-production replica: the release candidate, production configuration, and production-sized data (masked). Teams use it for smoke tests, a final regression run, and release checks. It's frozen for the release, and most defects should already be found by the time a build reaches it.
Sandbox and ephemeral environments
A sandbox is an isolated space, often a third party's test mode (see the comparison below). Ephemeral environments are short-lived copies created per branch or pull request; the trade-offs are covered in the virtual and ephemeral section below.
Which tests run in which environment
"Primary" means the test type mainly runs there. "Sometimes" means teams often run a subset there too. UAT is counted under Staging because it usually runs on a stable copy of it.
Test type | Dev | QA | Staging | Production-like or perf |
|---|---|---|---|---|
Unit | Primary | No | No | No |
Integration and API | Sometimes | Primary | Sometimes | No |
Functional and regression | No | Primary | Sometimes | No |
End-to-end | No | Sometimes | Primary | No |
Smoke | Sometimes | Primary | Primary | Sometimes |
Performance | No | No | Sometimes | Primary |
Security | Sometimes | Sometimes | Primary | Sometimes |
UAT | No | No | Primary | No |
Exploratory | Sometimes | Primary | Sometimes | No |
For release 4.2, unit checks run in dev on every commit, automated regression of cart, sign-in, and checkout runs in QA on every build, and the team runs a smoke test plus a final checkout run as an end-to-end test in staging before the go or no-go meeting. UAT runs on the UAT copy of staging, and a performance smoke test runs on the production-like environment.
Small teams often merge several columns, such as one environment for QA and staging. That works as long as each test type still has a clear home.
Test environment vs staging vs production
Aspect | Test (QA) environment | Staging | Production |
|---|---|---|---|
Purpose | Find defects | Final check before release | Serve real users |
Who uses it | QA and developers | QA, DevOps, release team | Customers |
Data | Synthetic or a subset | Masked copy of production | Real customer data |
Stability | Changes often | Frozen for the release | Live |
Configuration | Test endpoints and sandboxes | Mirrors production | Production |
Access | QA and dev teams | Limited | Restricted |
Cost of a failure | Low | A delayed release | Customer impact |
Test environment vs sandbox
A sandbox is an isolated space, often run by a third party, for trying things safely, such as a payment provider's test mode. A test environment is your own controlled replica of production, built for structured testing, and it often connects to those sandboxes.
Test environment vs test bed
A test bed is the specific combination of build, hardware, software, configuration, and data used for one set of tests. The test environment is the wider setup that hosts it. Many teams use the two terms interchangeably.
Testing in production, with feature flags, canary releases, and synthetic monitoring, complements a test environment. It doesn't replace one, because a failure in production reaches real users.
Key components of a test environment
Hardware and infrastructure
- Physical servers: dedicated machines that give the most realistic results. Teams use them for performance-sensitive applications or server-specific scenarios, since they cost more to buy and maintain.
- Virtual servers: easier to manage and scale, and able to simulate a wider range of environments at lower cost. Many are hosted on cloud services.
- Test devices: buying every phone and tablet isn't practical, so teams use device farms (physical or virtual) to reach devices with different screen sizes, OS versions, and processing power.
The deeper layer of machines, pipelines, and grids is covered in test infrastructure.
Software
- Operating system: match the production OS family and major version, so OS-specific bugs and performance issues show up before release.
- Database: replicate the production database structure, but use anonymized or synthetic test data to stay compliant with data security requirements.
- Middleware: the software that connects applications to each other and to data and services, such as an application server, message queue, or API gateway.
- Application software: the build under test. Keep previous versions available so teams can run regression tests and compare behavior.
Network
Firewalls, VPNs, DNS, load balancers, and latency should resemble production, and the environment needs access to the third-party services and sandboxes the application calls. Check this early, since a blocked port or missing allowlist entry looks like an application failure.
Configuration
Configuration is everything that changes behavior without changing code: environment variables, feature flags, service endpoints, secrets, and dependency versions pinned to match production. Keep it under configuration management, so you can compare one environment's settings with another's and spot drift, the slow divergence between environments that makes results stop matching.
Test data
Test data can be synthetic, a masked copy of production, or a subset. Decide how it resets between runs, so tests don't depend on what the last run left behind. Test data management covers masking, subsetting, and generation in detail.
Tools
Manual testing still needs a test management tool to record results and a defect tracker. Automated testing adds an automation framework, a CI/CD tool to deploy builds and trigger runs, and monitoring to show whether the environment itself is healthy. Automation testing covers how the framework fits in.
How to set up a test environment step by step
1. Gather requirements from the test plan
Start with the environment section of the test plan: scope, browsers, devices, operating systems, integrations, data, and who needs access. For release 4.2, that's QA, staging, and UAT URLs, Chrome, Firefox, Safari, and Edge (latest two versions), Windows and macOS laptops, iPhone and Android phones for mobile web, an iPad, the payment provider sandbox, a test email inbox, and the tax calculation service in test mode.
2. Design it to mirror production
List where the environment will intentionally differ from production, such as a smaller database or a sandbox payment provider, and why. Everything not on that list should match. Note backup needs for large datasets and long-running tests, and confirm you have the software licenses the environment needs.
3. Provision infrastructure
Create the VMs, containers, or cloud resources. Use scripts or infrastructure as code where you can, so the environment can be rebuilt the same way after a failure or for the next release.
4. Install and configure
Deploy the build under test and its dependencies, then set environment variables, secrets, and feature flags. Give the QA team and other stakeholders access credentials.
5. Connect the network and integrations
Point the application to third-party sandboxes, add mocks for services you can't call from a test environment, and set firewall or allowlist rules.
6. Load test data
Seed, mask, or subset the data, and decide how it resets between runs. For release 4.2, that means shoppers in each state (new, returning, with and without a saved card) and sandbox payment details.
7. Connect the CI/CD pipeline
Hook the environment into your CI/CD pipeline so each new build is deployed and the right tests run automatically.
8. Run a readiness (smoke) check
Before any test run, confirm health endpoints respond, seeded data is present, the deployed version matches the build under test, and feature flags are set. Make it a gate in the pipeline: if the check fails, fix the environment and log the issue for the environment owner before anyone starts testing.
9. Document and hand over
Record the owner, URLs, versions, refresh schedule, and how to report that the environment is down. That record gives the approver what they need to sign off the environment, and tells everyone what was set up and who to ask.
Manual vs automated test environment setup
Manual testers need stable data, access, and a clear schedule. Automation also needs parameterized configuration, so one test suite can run against any environment. Don't hard-code URLs, credentials, or API keys in test scripts; read them from configuration for the target environment.
What to write in the environment section of a test plan
- Environments in scope: for example QA, staging, and UAT.
- Configuration per environment: browsers, devices, OS versions, URLs, and integrations.
- Data source: synthetic, masked, or subset, and how it resets.
- Owner: who sets it up and keeps it running.
- Booking rules: who can use it, when, and for how long.
- Entry criteria: what must be true before testing starts, such as "release candidate deployed and the readiness check passes".
Virtual, containerized, and ephemeral test environments
- Virtual machines: full operating systems on shared hardware, useful when you need a specific OS image.
- Containers: tools such as Docker and Docker Compose package the application and its services, so the same environment starts on a laptop, a CI runner, or a server.
- Infrastructure as code: scripts that define servers, networks, and settings, so environments are rebuilt the same way each time.
- Per-branch or preview environments: a short-lived environment for each pull request, created by the pipeline and torn down afterward.
- Cloud browser and device grids: hosted browsers, operating systems, and devices, so you don't have to maintain a device lab.
Ephemeral environments remove booking conflicts and most drift. They also cost money for each spin-up, need fast data seeding, and struggle with third-party dependencies and long-running data. A long-lived shared QA environment is still the better choice for UAT, exploratory sessions, and integrations that can't be containerized. Test orchestration covers how pipelines assign environments and agents to test runs.
Test environment management best practices
- Treat configuration as code and check for drift. Compare each environment's configuration with production on a schedule, and fix differences that aren't on your intentional-differences list.
- Give every shared environment an owner and a booking rule. Say who reserves it, for how long, and how to announce that it's down.
- Refresh on a cadence. Rebuild or refresh after each release, and reset test data between automated runs.
- Protect personal data. Mask or synthesize it, and don't copy raw production data into lower environments.
- Control access and keep secrets out of test scripts. Store credentials in a secrets store or configuration, and limit who can change the environment.
- Monitor environment health. Track uptime and the version deployed in each environment, so testers know what they're testing.
- Automate provisioning and teardown where possible, so rebuilding is a routine job rather than a project.
- Retire environments nobody books. Idle environments drift, cost money, and confuse people about which one to use.
A light ownership model for each shared environment keeps the booking rule working. Your test strategy is a good place to record it.
Role | Responsibility | Example for release 4.2 |
|---|---|---|
Owner | Decides changes, refreshes, and retirement | DevOps lead |
Maintainer | Deploys builds, fixes outages, keeps configuration current | Platform engineer |
Users | Book time, run tests, report environment issues | QA team and product team (UAT) |
Approver | Signs off that the environment is ready for a test cycle | QA lead |
Test environment management checklist
- The deployed version matches the build under test.
- The configuration diff against production shows only intentional differences.
- Test data is seeded and in its starting state.
- Third-party sandboxes and mocks are reachable.
- Feature flags are set for this test cycle.
- Monitoring and logs are on.
- The environment has a named owner.
- The booking for this test window is confirmed.
- The rollback path for a bad deployment is known.
- Everyone knows where test results and environment issues are recorded.
When the environment is the bug
Failing or flaky automated tests are often caused by the environment, not the application. Common causes:
- Configuration drift: a setting differs from what the test expects.
- Shared data collisions: parallel runs change the same records.
- Unavailable third-party services: a sandbox is down or rate-limited.
- Slow environments: timeouts fire before the application responds.
- A stale deployment: the environment runs an older build than the one under test.
Before logging a defect, triage it:
- Re-run the test on a known-good environment.
- Check the deployed version and the configuration diff.
- Check the data state the test depends on.
- Check the health of dependencies and third-party sandboxes.
- Try to reproduce the failure locally.
If the failure follows the environment rather than the build, log it as an environment issue for the environment owner, not as an application defect. Tracking those separately shows whether flakiness comes from your tests, your application, or your environments. Test automation best practices covers the test side of the same problem.
Managing test environments in Katalon
Katalon runs your tests against the environments you already have. It doesn't provision your application servers or databases.
- Execution profiles: in Katalon Studio, execution profiles hold global variables such as URLs, credentials, and API keys, so the same test suite can run against dev, QA, staging, or production-like setups. You pick the profile in the run dialog or pass it on the command line, and a default profile holds shared variables that other profiles inherit or override.
- An environment for each suite: in Katalon True, an automated test run sets the environment per test suite: a desktop or mobile browser on a cloud-hosted or self-hosted agent, a mobile native app on a chosen device, or web services. Suites in one run can use different environments and run in sequence or in parallel. For release 4.2, one suite could place an order in Chrome on Windows and another could check the order history in Safari on iOS.
- Secrets and variables: Katalon True stores project-level secrets and variables and passes them as overrides to execution profile variables with the same key, with secrets masked. They apply only to runs in cloud-hosted environments.
- Cloud-hosted and self-hosted agents: cloud-hosted agents are managed by Katalon and scale across browsers, operating systems, and devices. Self-hosted agents run on a VM or private cloud you manage, for restricted networks, local dependencies, or CI/CD, and a run can auto-select an available agent that matches the operating system, name, or hostname you set.
- Private and local environments: if staging sits behind a firewall but is reachable from the internet, you can allowlist Katalon's outgoing IP addresses. If it's in a fully private network, run a Katalon Tunnel client on a machine inside that network and turn on Private/Local Testing for the run. See local testing with TestCloud.
- Browser, OS, and device coverage: Katalon TestCloud runs web tests on Windows, Linux, and macOS, and mobile browser and native app tests on real Android and iOS devices. The supported environments page lists current versions. For background, see understanding Katalon TestCloud.
- Coverage by environment: the Configuration Coverage Report shows coverage and pass rate for each OS and browser combination, scoped by release or sprint. That answers "which browsers and operating systems was release 4.2 tested on?"

Frequently asked questions
It gives tests an isolated, production-like place to run, so results are trustworthy and failures don't reach real users. It holds the build, configuration, network access, and test data each run needs.
It gives the QA team one stable, shared place to test each candidate build before it reaches staging, with data reset to a known state so results can be compared run to run. It sits between development and staging and is refreshed for each release.
Who controls it. A sandbox is usually a third party's isolated test mode, such as a payment provider's, that you call from outside. A test environment is your own production-like setup, and it often connects to several sandboxes.
A test environment changes often and uses test data so teams can find defects. Staging is the final pre-production replica, frozen for the release and as close to production as practical in configuration and data volume, and it's used for the last checks before go-live.
A test bed is the exact setup for one test run, for example build 4.2.0-rc1, Chrome on Windows, and the seeded checkout data. The test environment is the wider setup that hosts many test beds.
There's no fixed number. Small teams often manage with dev, one shared QA or staging environment, and production. Larger or regulated teams add dedicated integration, performance, security, and UAT environments, or ephemeral per-branch environments. Add an environment when two kinds of testing keep blocking each other.
Yes, for some checks: feature flags, canary releases, synthetic monitoring, and A/B tests all run in production. They complement pre-release testing in a test environment rather than replace it, because a failure in production reaches real users.
It's the environment where separately built modules and services are deployed together for the first time, so testers can check that APIs, databases, and the front end talk to each other correctly. Teams often use mocks there for services that aren't ready yet.

Test everything. Ship with confidence.
From generating test cases to spotting failures, Katalon's AI works across your entire pipeline, automatically.

