Quick answer

What is an SAP test automation framework?

An SAP test automation framework is the structure that lets automated SAP tests run the same way every time. It has six layers: test data and scenarios, actions that post, checks on SAP tables, report comparison, execution, and evidence with defects. PostNow.ai SAP Testing ships the six layers ready to use, so teams write tests, not framework code.

  • A framework is judged by its weakest layer. Fast postings prove little if nobody reads the tables afterwards.
  • Own tests, not plumbing. Each self-coded layer must survive every support package.

This guide is for test leads, QA architects and SAP CoE leads deciding how an SAP test automation framework should be structured: where test data lives, how a test posts, what it checks, where it runs and what it leaves behind. It goes deeper than the overview in the SAP test automation guide, and shows how PostNow.ai SAP Testing ships all six layers, so your team spends its time on tests.

What does a test automation framework for SAP include?

A framework is the rules and reusable parts that tests are built on: how data goes in, how steps are written, how results are judged and reported. A test automation framework for SAP adds three SAP traits:

  • The result is in the database, not in the save message.
  • Every posting leaves a document behind that the framework must track.
  • Organizational units multiply the cases: one test may run for several sales organizations and plants.

In PostNow.ai SAP Testing a test posts, reads SAP back, and its run record keeps the document numbers it created.

What are the six layers of an SAP testing framework?

Each layer of an SAP test automation framework answers one question. When a layer is missing, someone answers it by hand on every run.

1. Data and scenarios: what does the test run with?

The data layer keeps inputs apart from steps, so one test covers the normal case, variants that take another path through customizing, and at least one row SAP must refuse, which proves the checks can fail. The data must also exist in the test system after every client refresh.

In PostNow.ai SAP Testing each row runs as a scenario marked Expect success or Expect rejection, and master data can be created from a sheet, as covered in SAP test data management.

2. Actions that post: how does the test change SAP?

A test changes SAP through a BAPI or API call, a replayed recording, or the user interface. One test should mix them freely, and every action must return the document number and SAP's messages.

In PostNow.ai, actions post through the BAPI or API automations the team already publishes, SAP GUI recording steps run on the user's own computer with their own login, and variables carry the returned number forward.

3. Checks on SAP tables: did SAP save the right thing?

A check reads what the action saved: a key from the action, the fields, an operator per field and an expected value from the data row or a constant. On S/4HANA it must read the tables that release writes: for sales documents, SAP moved the status fields from VBUK and VBUP into VBAK and VBAP, and pricing results sit in PRCD_ELEMENTS, not KONV.

A PostNow.ai check step asserts each field as equal, greater than or within a tolerance.

4. Report comparison: did anything else move?

A table check proves one document; a report comparison proves the rest stayed put. It compares a trusted report row by row with a known-good output and needs rules for planned differences, or every valid posting fails.

A PostNow.ai report step runs an allow-listed SE38 report as an SAP background job against a baseline: a pinned run, or the same report run just before the posting. More in SAP report testing.

5. Execution and environments: where, as whom and when?

This layer sets the system, client, SAP user and trigger. Two rules come first: posting tests never reach production, and a stored SAP password is readable only by the machine that uses it.

PostNow.ai pairs each environment with a runner on a Windows machine you own. SAP logins are sealed to that runner, and production environments only accept runs that read and compare.

6. Evidence and defects: what is left after the run?

A green tick is not evidence. A record names the test and data versions, system and user, keeps inputs, messages, document numbers and expected against actual values, and cannot be edited later. Defects link to the failed step and close only on a passing retest.

In PostNow.ai each run is read-only with a SHA-256 checksum, kept for one, three or seven years, and Log defect opens a defect against the failed step.

PostNow.ai SAP Testing

How PostNow.ai provides all six layers

Each layer is part of the product, so the first week goes into tests.

  1. 01

    Load the scenarios

    Upload a data set from Excel. Each row posts or must be rejected.

  2. 02

    Post and read back

    Chain an action on a published automation with checks on the SAP tables.

  3. 03

    Compare and schedule

    Add a report baseline, then schedule the suite or run it per transport.

  4. 04

    Keep the record

    Each run is stored read-only with a checksum. A failed step becomes a defect.

Data-driven vs keyword-driven vs model-based testing frameworks

Styles describe how tests are written, not what they test.

StyleHow a test is writtenStrengthPlan for
Data-drivenOne script, many rows of inputs and expected valuesA new case is a new rowA technical owner for the script
Keyword-drivenNamed, reusable actions with parameters, such as "create order"Business testers can read testsA growing keyword library to curate
Model-basedTests derived from a model of the process or screensOne model change updates many testsKeeping the model in step with SAP
HybridReusable steps plus external data setsReadable tests, many scenariosRules on what is a step and what is data

For an SAP test automation framework, the deciding factor is who maintains the tests. PostNow.ai SAP Testing is a hybrid: a chain of reusable step types, with an Excel data set driving one scenario per row. Create with AI drafts the chain for your review, explained in AI test case generation for SAP.

BAPI level vs screen level SAP testing: which is more stable?

A screen-level test drives SAP GUI or a web UI as a user would. It proves the user's path, but a new field or a moved tab can stop it while the process is fine. eCATT reflects the split: TCD replays transactions without controls, and SAPGUI records screens that use them.

A BAPI-level test calls the business interface and runs SAP's own checks. BAPI_SALESORDER_CREATEFROMDAT2 saves nothing until BAPI_TRANSACTION_COMMIT runs, so commit only when the return messages show no error, then read the tables.

The rule for any SAP test automation framework: act at BAPI level where a BAPI fits, at screen level where the screen is under test, and check the tables either way. In PostNow.ai SAP Testing, BAPI and table steps are independent of screens.

Before and after

A home-built framework vs PostNow.ai SAP Testing

Built in-house

Six layers to write and keep alive

  • Table reads and report diffs written as code
  • Scripts that one or two engineers understand
  • SAP passwords in configuration files
  • Results in log files without a checksum
With PostNow.ai

Six layers ready to configure

  • Data sets, checks and baselines set up in the browser
  • Tests built from postings the team already publishes
  • SAP logins sealed to your own runner
  • Read-only run records with a SHA-256 checksum

Worked example: one order-to-cash test through all six layers

This example follows test O2C-07, "Standard order with a separate ship-to", through PostNow.ai SAP Testing on an S/4HANA QA system, client 200, with sales organization 1000, distribution channel 10, division 00 and plant 1100. These values are an example; the BAPI, tables and fields are SAP standard.

The rule to protect. An order for sold-to 300125 delivered to ship-to 300126 must be saved with that ship-to. A partner change can break this silently.

LayerIn O2C-07
1. DataThree rows: 12 pieces of TG-1180 to 300125 itself, 40 pieces to ship-to 300126, and sold-to 399999, which does not exist and must be rejected
2. ActionBAPI_SALESORDER_CREATEFROMDAT2 with ORDER_HEADER_IN, ORDER_PARTNERS (roles AG and WE), ORDER_ITEMS_IN and ORDER_SCHEDULES_IN (REQ_QTY).
3. ChecksThe fields in the table below, read by that order number
4. ReportA sales order list for sold-to 300125, baselined just before the posting
5. ExecutionWeekdays at 05:30, plus transport runs
6. EvidenceA run record and, on failure, a defect
FieldMeaningExpected value
VBAK-AUARTSales document typeFrom the data set
VBAK-VKORG, VTWEG, SPARTSales organization, distribution channel, division1000, 10, 00 (fixed)
VBAK-KUNNRSold-to partyFrom the data set
VBAP-MATNR, WERKSMaterial, plantTG-1180, 1100
VBAP-KWMENGOrder quantityFrom the data set
VBPA-KUNNR where PARVW = WEShip-to partyFrom the data set

Monday. Rows 1 and 2 post and match. SAP refuses row 3, so it passes. The report shows only the new orders.

Wednesday. A customizing transport changing partner determination reaches QA. The transport run reads its object list from E070, E07T and E071 and lists no test, because no test names those objects: a visible gap, not a clean result.

Thursday. The scheduled run catches it. Row 2 fails at the last check: VBPA-KUNNR for WE holds 300125, not the 300126 that was sent. Every other field passes, so the record points at one field, and PostNow.ai lists the order the run created and did not reverse, for cleanup.

Friday. A defect logged from the failed step goes to the SD consultant. The fix arrives by transport, the defect moves to Fixed, then Retest when O2C-07 re-runs its failed scenarios. Row 2 passes and the defect closes. Thursday's run stays unchanged.

⚠
Two triggers, not one. The transport run showed its gap; the schedule caught the side effect. See SAP regression testing.
Where teams start

The six layers in three situations

First suite

Stand up the framework with one test

Take a published posting, add a table check and a row SAP must refuse. All six layers work from the first run.

  • A posting the team trusts
  • A read-back on SAP tables
  • A scenario that must fail
SAP test automation
eCATT and CBTA

Rebuild the scripts that still prove something

Describe what an old script checks, and Create with AI drafts the test for your review.

  • A draft from plain words
  • Checks on the tables SAP writes
  • Your review first
Solution Manager test automation
Change control

Run the right tests for each transport

PostNow.ai lists the tests that use a transport's objects and shows the objects no test covers.

  • Tests matched to objects
  • Uncovered objects shown
  • One record per transport
SAP transport testing

How do you organise SAP test automation into suites, cycles and roles?

Four levels keep an SAP test automation framework usable at two hundred tests:

  • Test: one business rule, named with a process prefix, such as O2C-07.
  • Suite: the tests of one process. The unit you schedule.
  • Cycle: one phase or release. The unit you report and sign off.
  • Project: the environment and dates the cycles belong to.

Schedule core suites every weekday and keep test builders apart from approvers. PostNow.ai SAP Testing uses these levels and separates Testing Manager, Test Designer, Test Executor and Viewer, with approvers named per cycle. Write these choices into your SAP test strategy.

eCATT and CBTA: SAP's own test automation framework pieces

eCATT is the test tool of the ABAP system, opened with transaction SECATT. Its commands include TCD and SAPGUI for transactions, FUN for function modules and CHETAB for checking database table contents. A test configuration bundles a script with a system data container for the target systems and test data containers for parameters.

CBTA, Component Based Test Automation, belongs to SAP Solution Manager. It builds scripts from default components for basic actions and from screen components generated at the end of a recording, which several tests can share. SAP states that CBTA will be supported as long as Solution Manager is supported, and will not be expanded to SAP's cloud products. SAP Cloud ALM has no home-grown automation engine and works with a connected test automation tool.

PostNow.ai SAP Testing runs alongside these tools, and the SAP Solution Manager test automation guide builds one test in each.

How do you choose or design an SAP automation framework?

Build or buy an SAP test automation framework, ask the same questions. The last column is PostNow.ai SAP Testing's answer.

CriterionQuestion to askPostNow.ai SAP Testing
Data apart from stepsCan a key user add a scenario without editing steps?Excel data set, one row per scenario
Negative scenariosCan a row expect SAP to refuse it?Expect rejection, per row
Action levelCan one test post through a BAPI and a screen?Published BAPI and API automations, plus SAP GUI recordings
Read-backDoes every posting have a table check?Equal, greater than and tolerance checks
Report baselinesCan a report be compared row by row?SE38 report steps with expected-change rules
CredentialsWho can read the stored SAP login?Only your own runner
ProductionCan a posting test reach production?Production is validation-only
Change triggerHow are tests chosen for a transport?Transport runs on E070, E07T, E071
EvidenceCan a result be changed after the run?Read-only, SHA-256, kept 1, 3 or 7 years

SAP test automation tools, frameworks or a build of your own?

Building fits a team with spare developers, but every layer becomes code to maintain through each support package. Four steps settle it:

  1. List the ten postings whose failure would cost most, with the tables that prove each.
  2. Name an owner for each layer in a self-built design.
  3. Score every candidate against the table, including today's scripts.
  4. Pilot one process for two weeks, with one row SAP must refuse, and check its evidence against your auditor's questions.

PostNow.ai is an SAP test automation tool that answers the criteria from the product, and the pilot fits in the 14-day free trial.

Why it matters

What a missing framework layer costs the business

Automation missing a layer still runs every night. It just proves less than the dashboard suggests.

  • No read-back. Orders count as posted while the wrong ship-to sits in the partner table.
  • No baseline. A report total moves after a transport and nobody compares it.
  • No evidence. The auditor asks what ran, and the team repeats the testing months later.
PostNow.ai SAP Testing gives every test all six layers from its first run.

Frequently asked questions

How does PostNow.ai fit into an SAP test automation framework?
PostNow.ai SAP Testing ships all six layers of an SAP test automation framework ready to configure: an Excel data set drives one scenario per row, action steps post through published BAPI and API automations or SAP GUI recordings, check steps read the SAP tables, SE38 report steps compare rows with a baseline, suites run on a schedule or per transport, and each run is stored read-only with a SHA-256 checksum.
What is a test automation framework in SAP?
It is the shared structure automated SAP tests are built on: how data is supplied, how a test posts, how results are checked, where tests run and what record each run leaves. In PostNow.ai SAP Testing these six layers come with the product, so a team configures tests instead of coding a framework.
What are the main types of test automation frameworks?
Data-driven frameworks run one script with many data rows, keyword-driven ones assemble tests from named reusable actions, model-based ones derive tests from a model, and hybrids combine reusable steps with external data. PostNow.ai SAP Testing is a hybrid of reusable step types and Excel data sets.
Is eCATT a test automation framework?
eCATT is the test tool of the ABAP system, opened with transaction SECATT. It provides parts of a framework: script commands such as TCD, SAPGUI, FUN and CHETAB, plus test data and system data containers bundled in test configurations.
Should we build our own test framework for SAP?
Only if you have developers to maintain data handling, table reads, report comparison, credentials and evidence through every support package. PostNow.ai SAP Testing ships all six layers, so a pilot on one posting process shows quickly whether a ready framework fits.
Why test SAP at BAPI level instead of the screen?
A BAPI applies SAP's own business checks and does not depend on screen layouts, so the test breaks less often for reasons unrelated to the process. Screen steps are still right when the screen is under test or no BAPI fits. PostNow.ai SAP Testing supports both and checks the SAP tables after either.
How should SAP automated tests be organised?
Group tests by process into suites, run them on a schedule and per transport, track each release in a cycle, and separate design, execution and approval. PostNow.ai SAP Testing schedules suites daily, on weekdays, weekly or monthly, and names the approvers on each cycle.
A professional working in PostNow.ai on a laptop

Your framework. Ready on day one.

Build tests, not the framework

Bring one order-to-cash process. We set it up in PostNow.ai SAP Testing with a posting, table checks, a report baseline and a run record.

Request a demo
Book a demo

Bring one SAP process. We show it end to end.

Tell us where to reach you and which process matters. The PostNow.ai team replies by email to arrange the demo.

  1. 01You send the formIt goes straight to the PostNow.ai team.
  2. 02We agree a timeWe reply to your work email to set up the call.
  3. 03You see your own processA process from your own SAP work, shown from start to finish.

Request your demo

Name, work email and company are needed.

Please use your company email address.
What would you like to see?

We use your details only to arrange the demo. See our privacy policy.