Historical background
Test environments emerged as IT products became more complex. Allocating a separate environment allows testers to safely verify new functionality without affecting real users and data.
Problem
If testing is conducted in the production environment, there can be data loss, disruption of business processes, or security incidents. Sometimes test and production environments differ, leading to "elusive" errors—changes work in tests but break in production (or vice versa).
Solution
Separate environments for tests (test, staging, pre-prod) are organized, closely mimicking production. For manual testing, real alignment of API, data, configuration, and even "hardware" is important. Special attention is paid to isolating user data, configuring logging, monitoring, and control data.
Key features:
Can production environments be used for testing if tests are harmless?
No, there is always a risk of disrupting user operations or "exposing" test data. Even "harmless" tests can impact statistics or cause load.
What is the difference between test, staging, and pre-prod environments?
Test — an environment for main manual and automated tests, may differ in data. Staging/pre-prod — closely resembles production, reproducing the infrastructure and data for final testing.
What type of data is preferable to use in the test environment: real, anonymized, or synthetic?
The best option is anonymized data that closely resembles real data in structure. Real data compromises security, and purely synthetic data does not reflect real behavior.
Bug fix testing is conducted in production; after release, the bug is fixed only in the test environment, resulting in a new error in production: clients are complaining en masse.
Pros:
Cons:
The team manually verifies a feature on a separate staging environment, test data is regularly updated, and tests are as close to reality as possible.
Pros:
Cons: