Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 1 of 5

Why test below the UI

10 min

Listen to this lesson

0:00 / 5:40

A Fiori screen, an SAP GUI transaction and an external system calling an API all end up in the same place: the business logic and database of SAP S/4HANA. When the question a test asks is "does the system price, check and post this correctly?", the user interface is often just the slowest and most fragile way to ask it. Tests that talk to services directly run in seconds, do not care about themes or screen layouts, and give precise answers. This course shows how to build them for the three interface styles you will meet in almost every SAP landscape: OData, SOAP and IDoc.

User interfacesFiori apps (SAPUI5 over OData), SAP GUI transactions. Prove usability, roles and the user path.
Service interfacesOData V2/V4 APIs, SOAP services, IDocs, RFC/BAPI. Prove integration contracts and business rules.
Business logicPricing, availability, credit, account determination, workflow. Shared by every channel above.
PersistenceDocuments and journal entries: where expected results are finally checked.
Every channel reaches the same business logic. Service tests skip the slowest, most fragile layer.
The Sign-Off Table · thesignofftable.com/academy/sap-tau-203

What you gain

  • Speed: an OData call that creates a sales order returns in a second or two; the same flow through a UI script takes far longer with logon, navigation and rendering.
  • Stability: no locators, no rendering waits, no theme or layout changes. Service contracts change far less often than screens, and released APIs are versioned.
  • Precision: the response tells you exactly which field, message class or status went wrong, instead of a screenshot of a red message bar.
  • Coverage of interfaces themselves: for integrations (EDI orders, bank files, a dealer portal) the service is the user. Testing it through a UI would test the wrong thing.

What you give up

Service tests do not prove that a user can do the job. They skip the launchpad, role content, field labels, value helps, draft handling and messages on screen. They also skip whatever logic lives only in the UI layer, such as client-side validations in a custom app. And they can give false comfort when the API a test calls is not the one users or interfaces use: a test that creates sales orders through a released API proves little about an inbound EDI channel that uses IDocs and different defaulting.

Test each integration through the channel production really uses; a passing API test says little about an EDI channel built on IDocs.
The Sign-Off Table · thesignofftable.com/academy/sap-tau-203
Risk to coverBest layerWhy
Pricing and tax for 40 customer and product combinationsAPI testMany data variants; screen adds nothing
EDI order from Great Lakes Fleet Services posts correctlyIDoc testThe IDoc is the real channel
Maria can find, change and save an order in Manage Sales OrdersUI testThe user path is the point
Role SD key user cannot release a credit-blocked orderAPI plus one UI checkAuthorization is enforced in the back end; confirm the UI hides the action
Month-end posting of 2,000 journal entries from the fleet billing systemSOAP or API testVolume and contract, not screens
Choose the test layer by the risk, not by habit.
The Sign-Off Table · thesignofftable.com/academy/sap-tau-203

Assert on business outcomes

The most common weakness in service tests is stopping at "HTTP 201 Created" or "IDoc arrived". A technical success code says the request was accepted, not that the business result is right. Every service test at Contoso ends with a business assertion: the order has the expected net value and status, the IDoc reached a posted status and the sales order exists with the right quantities, the journal entry balances in company code 1710 with the right G/L accounts. This is the same rule as for any SAP test: expected results are written before execution and checked against the documents.

201 Created only says the request was accepted; the test passes when the order read back has the expected values.
The Sign-Off Table · thesignofftable.com/academy/sap-tau-203

What would you do?

Grace asks whether the new API tests mean the team can drop all UI regression for order-to-cash. What should Priya answer?

Key points
  • Service tests reach the same business logic as the UI, faster, more stably and more precisely.
  • They skip the user path, roles and UI-only logic, so keep a smaller set of UI tests.
  • Test integrations through their real channel: IDoc for IDoc, SOAP for SOAP.
  • Never stop at a technical success code; assert on the business document.

Check your understanding · not graded

Lesson check

  1. 1. What does a service-level test typically skip compared with a UI test?

  2. 2. An EDI customer sends orders as IDocs. What is the right channel for the automated regression test?

  3. 3. Which assertion makes an API test a real business test?

  4. 4. Pricing must be checked for 40 customer and product combinations. Which layer fits best, and why?