Lesson 5 of 6
Payload regression testing
15 min
Listen to this lesson
sap-int-301 sets the principle: replay historical PO messages through the migrated flow and compare outputs. SAP's migration course says the same and cites testing at 60 to 65% of migration effort. This lesson is the mechanics: how to capture a regression set, which layer to test it at, how to write comparison rules a machine can apply, and where the sets live after go-live.
Capture the regression set
A regression set is, per interface, a folder of input messages, the output PO produced for each, and the rules for comparing them. Capture both sides from PO: the payload as received and the payload as delivered after mapping. PO keeps message versions only as long as its logging and archiving settings allow, so Sam agrees a capture window with persistence switched on for the interfaces in the next wave, and Theo's team exports from message monitoring while the data is there. Aim for coverage, not volume: every message type and partner, single and multi-item documents, special characters, every currency and unit, empty optional fields, month-end and peak-day messages, and inputs that failed in PO.
These are real orders, invoices and payments. Nadia's rule at Contoso: regression sets sit in a restricted repository, personal data is scrambled the same way on input and expected output, and every set has a retention date.
Three test layers
Layer 1, the mapping. In Design > Integrations and APIs, open the flow, choose Edit, select the mapping and choose Simulate. Load an input XML from the regression set, choose Generate Test, then Download Output and compare it with PO's after-mapping payload. You don't have to save the mapping first, and simulation is supported for the Cloud Integration runtime profile only. It is quick and precise, and it's the right place to test a Groovy script the agent generated, one message at a time.
Layer 2, the flow. Integration flow simulation runs a whole flow, or part of it, before deployment. It can't call a real receiver, but you can mock a receiver's response with Add Simulation Response, and you can upload a zip as input. Use it for routing, content modifiers and converters. Layer 3, end to end. Deploy to the test tenant on the CMC_TEST path, replay each input through the real sender adapter, and let the receiver channel deliver to a capture endpoint in the test landscape, never to a partner. Only this layer sees encoding, file names and headers as the receiver would.
Comparison rules a machine can apply
| Check | Rule | Typical normalization |
|---|---|---|
| Payload | Every field value equal after mapping | Ignore message IDs and creation timestamps; compare XML canonically unless the receiver depends on element order |
| Envelope | Bytes the receiver sees: encoding, byte order mark, line endings, file name pattern, headers it reads | None by default; each exception needs the owner's written acceptance |
| Routing | Same receiver and interface for each input | None |
| Errors | Inputs that failed in PO fail in the new flow and raise an equivalent alert | Error text may differ if the owner agrees |
| Volume | Peak-day replay within agreed time and resource limits | Within target, not identical |
Write the rules down per interface before the first run. A comparator that ignores whitespace by default will hide the line-ending difference that breaks a bank file; one that compares everything will fail on every timestamp. Keep the rule file in the regression set so the next person reruns the same judgment. Watch volatile values on API responses too: an entity tag or a generated ID is as much noise as a PO message ID.
Where the sets live, and SAP's offerings
Store each set under version control beside the flow it tests: inputs, expected outputs, rules, and a small metadata file with the interface ID from the assessment register, capture dates, PO release, data classification and owner. After the switch the set becomes the interface's regression suite, rerun after mapping fixes, Integration Suite updates and S/4HANA support packages. SAP's migration course describes a managed SAP Integration Suite Testing Service for testing during and after the move, and notes partner test tools offered free for a limited period during PO migrations; check the current terms with SAP before you plan on either.
- A regression set is inputs, PO outputs and written comparison rules, captured with data protection controls.
- Test at three layers: Simulate for the mapping, flow simulation, and end-to-end replay in the test tenant to a capture endpoint.
- Normalize volatile values explicitly; never ignore envelope differences by default.
- Prove the comparator can fail, then keep the set as the interface's regression suite.
Check your understanding · not graded
Lesson check
1. What do you need to run Simulate on a migrated message mapping?
2. Which layer is the only one that sees the bytes a receiver gets, such as encoding and line endings?
3. A green comparison run looks too good. What is the quickest way to prove the comparator works?
4. Where should an end-to-end replay in the test tenant deliver its output?