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

Lesson 1 of 6

Why role testing is separate

8 min

Listen to this lesson

0:00 / 4:09

Most SAP functional testing is done with users that have broad access. Testers need to get through a scenario without stopping for every missing authorization, so they often run with wide test roles or even a copy of a superuser profile. That is a sensible way to test whether the process works. It says nothing about whether the people who will run the process in production can do it.

Role testing closes that gap. It answers two questions for each business role: can a user with exactly this role do every step of their job (a positive test), and are they stopped from doing what they should not (a negative test)? These are different questions from "does the process work", so they need their own test cases, test users and evidence.

What an authorization check actually checks

In SAP S/4HANA's ABAP stack, access is granted through roles maintained in the role maintenance transaction PFCG. A role generates an authorization profile containing authorization objects, each with fields and permitted values. When a program runs, it checks objects such as the sales document type and activity, the sales organization, the purchasing organization or the company code. Activity values distinguish create (01), change (02) and display (03). If the user's profiles do not contain a matching value, the check fails.

Launchpad visibilityBusiness catalogs, spaces and pages decide which tiles the user sees
Start authorizationThe user may start the transaction or call the app's OData service
Object and activity checksThe program checks the document type and whether create, change or display is allowed
Organizational level checksValues such as company code 1710, plant 1720 or sales organization 1710 limit where the user can act
Layers of access a role test must pass through. A defect can sit at any layer.
The Sign-Off Table · thesignofftable.com/academy/sap-tst-207

For SAP Fiori apps, the same backend checks apply, plus two more layers in front of them: the app must be in a business catalog assigned to the user's role so the tile appears, and the user must be allowed to call the app's OData service. A user can therefore see a tile and still fail when the app loads data, or have all backend authorizations and never see the tile. In SAP S/4HANA Cloud Public Edition, roles are built from business role templates and business catalogs in the Maintain Business Roles app, with restrictions for read and write access, but the testing questions are the same.

Sees the tile, fails on loadCatalog is in the role but the OData service or object check is missing: the AP clerk's Manage Supplier Invoices error.
Works as designedTile appears and every backend check passes. This is what a positive test must prove through save.
No access at allCorrect when the role-to-process matrix says "not allowed"; a defect when it says "allowed".
Hidden but reachableNo tile, yet the backend allows it: the user can still start it by URL or transaction code.
Launchpad visibility and backend authorization are separate, so a Fiori role can fail in four different ways.
The Sign-Off Table · thesignofftable.com/academy/sap-tst-207

Go-live symptoms of untested roles

  • On day one, warehouse staff in Chicago cannot post goods issue because their role has plant 1710 but not 1720.
  • Accounts payable clerks see the Manage Supplier Invoices tile but get an error when the list loads.
  • A buyer can approve her own purchase orders because a role change copied an approval authorization.
  • The service desk is flooded with access tickets, and emergency access is handed out widely, which auditors later flag.

Each of these is a defect that broad-access functional testing cannot see. They are also expensive in production: emergency fixes to roles are rushed, poorly tested, and tend to grant too much.

Where role testing fits in the plan

On Contoso's program, Priya schedules role work in three places. Security unit-tests each role as it is built. A dedicated role test cycle runs after integration testing, using test users with the planned production assignments. User acceptance testing then runs with those same users, so key users like Maria experience the system exactly as they will on day one. Each step finds different defects, and skipping the dedicated cycle pushes all of them into UAT, where they block business testers who have limited time.

  1. BuildSecurity unit testEach role is checked as it is built: it generates, and its core transactions and apps start.
  2. Integration testProcess testing with broad accessProves the processes work end to end; says nothing about roles.
  3. After integrationDedicated role test cyclePositive and negative tests with test users holding the planned production assignments.
  4. UATBusiness testing with real rolesKey users such as Maria work exactly as they will on day one.
Where role testing sits in Contoso's test plan; skipping the dedicated cycle pushes its defects into UAT.
The Sign-Off Table · thesignofftable.com/academy/sap-tst-207

What would you do?

Contoso's integration test cycle passed with all testers using a broad test role. Grace, the PMO lead, asks whether the business roles are ready for go-live. What is the most accurate answer from Priya, the test lead?

Key points
  • Functional tests with broad access prove processes, not roles.
  • Role tests ask two questions: can the user do their job, and are they stopped from what they should not do?
  • Access passes through launchpad visibility, start authorization, object and activity checks, and org-level checks.
  • Untested roles cause day-one access failures and over-granted emergency fixes.

Check your understanding · not graded

Lesson check

  1. 1. Why do functional tests run with broad access miss authorization defects?

  2. 2. Which activity value commonly means display in an authorization object?

  3. 3. A user sees a Fiori tile but the app fails when loading data. Which layer is the likely problem?

  4. 4. Which transaction is used to maintain roles in the ABAP stack?