Lesson 5 of 5
Specifying test environments
10 min
Listen to this lesson
A test environment is more than a system. It is a system and client, plus the right transports, data, users, interfaces, background jobs and tools, available on the dates the plan needs them. When any one of these is missing, testers lose days, or worse, they pass tests that should have failed. The architect's job is to specify the environment per test type, early enough that Basis and SAP can deliver it.
One environment per test purpose
| Test type | Environment at Contoso | Data | Interfaces |
|---|---|---|---|
| Unit test | CMD 300 and cmc-ext-dev | Small sample data created by the developer | Stubs or development endpoints |
| Integration and system test | CMQ 100 and cmc-ext-test | Refreshed production copy, scrambled where personal | Partner test endpoints, for example Great Lakes Fleet Services' test system |
| User acceptance test | CMQ 100 | As integration, plus business-prepared scenarios | As integration |
| Regression | CMQ 100 during the program; CMR 100 after go-live | Stable regression data set, reset per cycle | Partner test endpoints or simulated responses |
| Performance | CMR 100 and cmc-ext-preprod | Production volumes | Production-like endpoints with agreed load limits |
| Cutover rehearsal | CMQ 100, refreshed from CMP | Fresh production copy | As production, with outbound messages blocked |
| Training | CMQ 200 | Stable training data, rebuilt per class cycle | None, or simulated |
Contoso's test environment map. Each test type has one named home.
Data: refresh, protect, reset
Production-like data is what makes a quality or pre-production system worth having, and it is also where privacy risk lives. Contoso refreshes on a planned schedule rather than at random: CMR quarterly, before each release regression window, and CMQ before major project test cycles. In the private edition, homogeneous system copies of ABAP systems are a service SAP includes up to a stated number per system per contract year after the initial build; each is requested with a lead time. After every copy, a post-copy checklist runs: personal data scrambled, interfaces repointed, outbound email and payment files blocked, test users restored, jobs reviewed.
- RequestSam requests the CMP → CMQ copy with dates agreed with Priya
- CopySAP performs the system copy within the contract allowance
- ProtectPersonal data scrambled; outbound channels blocked
- RepointRFC destinations, BTP destinations and partner endpoints set to test targets
- RestoreTest users, roles and regression data sets restored
- VerifySmoke tests and an environment checklist signed before testing resumes
Integrations: the usual weak spot
Interfaces fail tests for environmental reasons more often than for functional ones: a partner's test system is down, a certificate expired, a destination still points to the previous target. RISE contracts also let SAP configure communication restrictions between production and non-production tiers, which is good protection, but it means a test system cannot reach a production endpoint even by accident, so test endpoints must exist. For each interface, the environment specification names the test counterpart, who owns it, when it is available and what to do when it is not, for example a simulated response.
Users and roles in test environments
Test users should hold the same business roles that real users will hold, not broad technical authorizations. Contoso creates test users per business role, for example an order-to-cash clerk for sales area 1710 / 10 / 00 and a separate accounts payable clerk like Ana's role, so that a test passes only if the role allows it. Broad authorizations hide missing ones: a tester with full access will never find that the clerk role cannot release a billing document. After each refresh, these users and their role assignments are restored from a documented list, because a production copy brings production users with it.
The environment specification
- System, client and BTP subaccount for each test type, with the transport level expected.
- Data source, refresh date, protection steps and reset method.
- Test users and roles, mirroring the business roles being tested.
- Interface counterparts, owners, availability and fallback.
- Background jobs that must run, and those that must be stopped.
- Tools: test management in SAP Cloud ALM, automation and monitoring access.
- Entry checklist and who signs it before a cycle starts.
What would you do?
Priya's test cycle starts Monday. On Friday, Sam reports the CMQ refresh finished, but the post-copy checklist is incomplete: interfaces still point to the production endpoints copied from CMP. What should Priya do?
- Specify each test type's environment: system, client, subaccount, data, users, interfaces, jobs and tools.
- Refresh on a planned schedule; protect personal data and repoint interfaces after every copy.
- In the private edition, system copies are requested services within a contract allowance and lead time.
- An environment checklist is an entry criterion; results from a failed environment are re-run.
Check your understanding · not graded
Lesson check
1. What should happen after every production-to-quality copy?
2. Which environment does Contoso use for performance tests?
3. Why must test endpoints exist for every interface in a RISE landscape?
4. What should happen to results from an environment that failed its checklist?