Lesson 3 of 5
Testing with a trading partner
16 min
Listen to this lesson
Partner testing is layered on purpose. Each layer assumes the one below works, so you test from the bottom up and don't start a layer until the one below meets its exit criteria. Otherwise a certificate problem looks like a mapping defect, and a mapping defect looks like a pricing problem.
Layer 1: connectivity
Exchange certificates first, through a channel the security team trusts, and confirm fingerprints by phone or a second channel. Then send a small test file each way. Exit criteria: a signed, encrypted file received in each direction, a signed MDN returned and verified each way, the MIC matched, and a negative case proven, for example a file signed with an unknown certificate rejected as expected.
Layer 2: syntax and envelopes
Now send real 850 test files and real outbound documents. Check envelope identifiers and qualifiers in both directions, that control numbers in ISA13, GS06 and ST02 match their trailers and don't repeat, and that 997s come back accepted within the agreed time. Mark every test interchange as test: ISA15 = T. In TPM, the agreement's Send Test Interchange to Target System setting then decides whether test interchanges reach SAP S/4HANA, and the B2B monitor shows the usage indicator as Test. Agree with the partner that their test files also carry T, so nothing from the test window can become a production order.
Layer 3: business rules
Each mapping rule gets at least one positive test, and each error behavior a negative test. The test data has to exist: the customer and its 11 depot ship-tos in client 100 of CMQ, the VOE2 and VOE4 entries, customer-material records for Northern Plains' part numbers, and a price contract. Expected results come straight from the spec examples.
| Test | Input | Expected result | Rule |
|---|---|---|---|
| Standard order | PO NP-77810, depot D07, 10 EA of NP-ALT-24 | Sales order for 10 PC CMC-ALT-100, ship-to 17100457, customer PO NP-77810 | NPCL-850-01, -07, -10, -12 |
| Unknown depot | Depot D99 | IDoc status 51 with a partner determination error; no 855 sent | NPCL-850-07 |
| Unknown part | Buyer part NP-XXX-00 | IDoc status 51 for material determination; Maria's team notified | NPCL-850-12 |
| Price difference | PO104 = 225.00 against a contract of 232.00 | Order created at contract price with a warning for Maria | NPCL-850-14 |
| Duplicate PO | Second 850 with PO NP-77810 | Duplicate purchase order check stops a second order | Business key |
| Missing date | No DTM*002 | Order created; requested date set by Maria's team | NPCL-850-04 |
Business-rule tests for the Northern Plains 850, derived from the spec. Numbers are illustrative test data.
Layer 4: end to end
The last layer runs the full cycle with the partner checking its side: Northern Plains sends an 850, Contoso returns the 855, ships with an outbound delivery and sends the 856 at goods issue, bills and sends the 810. The partner confirms that each document posted in its system: the 855 updated its PO, the 856 created a receipt expectation, the 810 matched the PO and receipt. That three-way match on the partner's side is the real exit criterion; a clean 997 only proves syntax.
Entry and exit criteria
Agree criteria per layer with the partner before testing starts and write them in the test plan. Contoso uses entry criteria such as "spec version 1.0 signed; certificates exchanged; test data loaded" and exit criteria such as "all planned tests run; no open severity 1 or 2 defects; every rule ID has a passed test; partner confirms its side in writing". Certification is the partner's formal statement that the exit criteria of the last layer are met.
What would you do?
In the second test week, Northern Plains reports that Contoso's 856s are "rejected", but Contoso sees accepted 997s for every 856. What should Priya do next?
- Test from the bottom up: connectivity, syntax and envelopes, business rules, end to end.
- Mark test interchanges with ISA15 = T; in TPM, Send Test Interchange to Target System controls whether they reach SAP.
- Every mapping rule gets a positive test and every error behavior a negative one; prepare VOE2, VOE4 and customer-material data first.
- The partner's confirmation of its business result is the real exit criterion; a 997 only proves syntax.
Check your understanding · not graded
Lesson check
1. Which layer of partner testing should be finished first?
2. What does ISA15 = T on a test interchange do?
3. An unknown depot code arrives in a Northern Plains 850. What did the spec define as the expected result?
4. What is the real exit criterion of the end-to-end layer?