Lesson 5 of 5
Verification, not replay
17 min
Listen to this lesson
A replayed recording proves only that the clicks happened. A test must prove that the business outcome is right: the order exists, with the right price, the delivery reduced stock, the invoice posted to the right accounts. This lesson turns a GUI script into a test by adding verification at three levels: the immediate message, the created document and its follow-on data.
Three levels of verification
Level one is necessary but weak: a success message says the system accepted the input, not that the result is right. Level two reads the document back, for example by opening it in display mode or querying it through an API, and compares fields to expected values from the test case. Level three follows the process: after billing, check that the accounting document exists and posted to the expected revenue account; after goods issue, check that stock at plant 1710, storage location 171A, went down by the delivered quantity.
Capturing document numbers
The document number is the link between steps. Read it from the success message's variables rather than parsing the visible text, which changes with the logon language. Store it in the test's run context, use it for every later step and write it to the test log. A test log that says "order 0000012345 created, delivered with 80012345, billed with 90012345" is evidence a reviewer can check in the system.
- Create orderVA01; read the order number from the success message variables
- Verify orderDisplay it; check customer Great Lakes Fleet Services, CMC-ALT-100, quantity 10, expected net price
- DeliverCreate the outbound delivery and read its number; at Contoso, picking and goods issue for 171A run in embedded EWM (warehouse 1710), so the test waits for the goods issue status
- Verify stockCheck that stock at 1710 / 171A fell by 10
- BillCreate the invoice; read the billing number
- Verify accountingCheck the accounting document exists in company code 1710 with the expected amounts
Where SAP's own tools fit
eCATT builds these ideas into its commands. During SAPGUI recording you can insert GETGUI commands to read values from the screen and CHEGUI commands to check them. Its MESSAGE ... ENDMESSAGE block collects messages raised by the commands inside it and applies rules, checked from top to bottom, that decide whether each message is allowed, expected or a failure, identified by message type, class and number. Whatever framework you use, the same design applies: explicit expected messages, read-back of values, and a clear verdict.
| Weak check | Strong check |
|---|---|
| No error popup appeared | Success message of the expected class and number, with a document number |
| The window title changed | The document can be displayed and its fields match expected values |
| The script waited 10 seconds | The script polled until a status was reached, with a timeout |
| A screenshot was taken at the end | Document numbers and checked values are logged; screenshots only at key checkpoints |
| The script ran without stopping | Negative tests confirm that wrong input is rejected with the expected error |
Replacing replay checks with verification.
Negative tests and evidence
Verification includes proving that the system rejects what it should. A negative test enters an order for a blocked customer or a purchase order above the $25,000 approval threshold and checks for the expected error or workflow status. These tests are often the most valuable automated checks, because a broken validation causes damage silently. Keep the evidence focused: document numbers, compared values, message IDs and a few screenshots at decisive points. That is what Priya attaches to the test run in SAP Cloud ALM for the regression sign-off.
What would you do?
A colleague proposes making the billing test "more reliable" by removing the accounting check, because it sometimes fails when the accounting document is not there yet. What is the best response?
- Verify at three levels: step outcome, document content and follow-on effects.
- Read document numbers from message variables; log them as evidence.
- eCATT's GETGUI, CHEGUI and MESSAGE blocks show the pattern: read, check, rule-based messages.
- Include negative tests; keep evidence focused on numbers, values and message IDs.
Check your understanding · not graded
Lesson check
1. Which is the strongest verification after creating a sales order?
2. Why read the document number from message variables instead of the text?
3. What do eCATT's MESSAGE ... ENDMESSAGE rules do?
4. Which is an example of a negative test?