SAPFX · Open-source SAP test automation for Robot Framework
SAPFX (package robotframework-sapfx) is a set of open-source Robot Framework libraries (Apache 2.0) to automate SAP testing on four channels: SAP GUI for Windows (SAP ECC and SAP S/4HANA® systems), SAP Fiori® apps and SAPUI5 as well as SAP GUI for HTML, OData APIs v2 and v4, and RFC/BAPI. Each channel keeps its native locators and the rules are shared; a single test can cross two or three of them: prepare through the API, act on the screen, check through an independent channel. For teams that lose CBTA when maintenance of SAP Solution Manager 7.2 ends in 2027, it is an open-source alternative.
Testing SAP: one deadline and three difficulties
Mainstream maintenance of SAP Solution Manager 7.2 ends on 31 December 2027, and CBTA with it. At the same time, SAP landscapes mix the classic screen, SAP Fiori apps and APIs.
The end of CBTA in 2027
SAP Solution Manager 7.2 leaves mainstream maintenance on 31 December 2027 (SAP Note 3585220) and SAP is steering its customers toward SAP Cloud ALM, which manages and tracks tests; their automated execution goes through tools that connect to it. Existing CBTA scenarios must therefore be taken over in another tool.
Tests that break with every upgrade
A renumbered screen identifier, an SAPUI5 control rendered differently, a translated label: a test written against the layout breaks at the first support package. SAPFX targets controls by their type, their label or their key, and its locator repairs are always logged, never silent.
Three technologies, often three tools
SAP GUI for Windows, SAP Fiori apps in the browser, OData and RFC APIs: each has its own tools, skills and reports. SAPFX brings them together in Robot Framework, with the same rules, the same runner and the same report.
What SAPFX automates today
Six uses proven live on SAP development systems (ABAP Platform 1909 and 2023), each linked to its evidence on the SAPFX in pictures page.
SAP regression tests before an upgrade
The same campaign is replayed on two releases by changing only variables: the price of a product read through three channels was validated 7/7 on release 754 and 7/7 on release 758. Each campaign starts by proving the release and the kernel of the target system. From ECC to S/4HANA: the method.
Take over CBTA or eCATT scenarios
The scenarios are rewritten in Robot Framework, in a text format that you version and review. A migration guide from CBTA comes with the libraries.
End-to-end business processes, across several channels
A Business Partner role added on screen and confirmed in the database, a background job scheduled with SM36 and its spool read through RFC, an outbound IDoc judged by its status and its inbound counterpart found: each step is checked by a channel independent of the one that acts.
Check a piece of data through two or three channels
The number of products counted in SE16 equals the OData $count (205 = 205), the counter of a launchpad tile equals the aggregate of a CDS view read through RFC (19 = 19).
Extract an SAP table to CSV, Excel, JSON Lines, SVG or Parquet
An ALV grid, a WebGUI grid, an SAPUI5 table or a table read through RFC return the same shape, written then read back in five formats. A truncated read is rejected: on three of these channels, nothing in the rows betrays that some are missing.
Check the security configuration of an ABAP system
Profile parameters judged on their return code, accounts that can really be used, web services actually served, audit log coverage, a posture report: read-only, through RFC.
Three libraries, four channels, shared rules
The libraries do not merge the technologies: each keeps the locators of its channel, and they share rules (wait for the real state of SAP, judge a message by its identity, extract a table without losing a row, prove which system you are talking to). The business vocabulary is built above, in the project's Robot Framework keywords.
SAP GUI for Windows
Through the SAP GUI Scripting API: ALV grids read in full, table controls, trees, drop-down lists by key, locators by visible label, system identity proven before acting, several sessions by alias. See it in pictures.
SAP Fiori, SAPUI5 and SAP GUI for HTML
On top of the Browser library (Playwright): UI5 controls addressed by type and properties, real page idleness, launchpad by intent and tile counters, WebGUI by SID, UI5 Web Components, nested iframes. See it in pictures.
OData v2/v4 and RFC/BAPI
OData with SAP's CSRF protocol, $metadata and its labels, $batch, test data factory; optional RFC through pyrfc: tables, BAPIs judged by message type, background jobs and spool, IDoc. See the examples.
One test, two or three channels
Here, the same product is read through the OData service, through the SE16 grid of the WebGUI and through RFC, and the three prices are compared with each other, after normalizing the user's decimal notation read on the system. Real excerpt of the suite, validated 7/7 on releases 754 and 758, replayed 7/7.
6. Assertion reine : les trois canaux rendent le même prix # … ${prix}= The Three Channels Should Agree On The Price ... ${API_RECORD} ${WEBGUI_RECORD} ${RFC_RECORD} ... ${DECIMAL_NOTATION} ${devise}= The Three Channels Should Agree On The Currency ... ${API_RECORD} ${WEBGUI_RECORD} ${RFC_RECORD}
Read Epm Products By Api # … ${projection}= Set Variable ... ${EPM_PRODUCT_API_ID_FIELD},${EPM_PRODUCT_API_PRICE_FIELD},${EPM_PRODUCT_API_CURRENCY_FIELD} ${chemin}= Set Variable ${EPM_PROD_MAN_SERVICE}/${EPM_PRODUCT_ENTITY_SET} IF '${top}' == '${EMPTY}' ${entites}= Get Odata Entities ${chemin} alias=${alias} ... $filter=${critere} $select=${projection} $orderby=${EPM_PRODUCT_API_ID_FIELD} # … Read Epm Product By Webgui # … [Arguments] ${product} ${url} Open WebGui Data Browser ${url} Display WebGui Table Contents With Filter ${EPM_PRODUCT_TABLE} ... ${EPM_PRODUCT_KEY_COLUMN}=${product} ${extrait}= Extract Displayed WebGui Grid ... key=${EPM_PRODUCT_KEY_COLUMN} ... source=produits EPM (${EPM_PRODUCT_TABLE}) filtrés sur ${product} Table Extract Should Be Complete ${extrait} # … Read Epm Product By Rfc # … [Arguments] ${product} ${alias}=${RFC_ALIAS} ${lignes}= Read Business Records ${EPM_PRODUCT_TABLE} ... ${EPM_PRODUCT_COLUMNS} ... filter=${EPM_PRODUCT_KEY_COLUMN} EQ '${product}' alias=${alias}
The nine hybrid tests, with their screenshots and their code: SAPFX in pictures.
A transport lands: which tests should you replay, and why?
Replaying everything ties up the whole campaign; choosing from memory lets a regression through. The SAPFX change impact analysis reads the transport in the SAP system, follows each object to what uses it, then crosses the names with the Robot Framework suites by what each test really executes, not by what a file mentions. It proposes, with the proof of every line; a human decides, and the decision is recorded.
1. Open the transport
The request and its tasks, where objects live until release. Each line is brought back to its main object: a method to its class, an include to its program, a table entry to its table. Over RFC, read only: nothing is installed on the SAP side.
2. Read one level of use in the system
In the references SAP keeps up to date: programs, transactions, CDS views, classes, function modules, dictionary elements, OData services. Measured on S/4HANA 1909: table TTZCU is read by 89 programs, started by 5 transactions including ST03. A capped read says so, never silently (T000: 2,793 programs).
3. Cross with the suites, by what they execute
Each suite is read by the Robot Framework parser, with nothing executed: from keyword to keyword through its resources, its variables, its Python libraries and its variable files. It carries its reach: called, dynamic (a computed name is never taken for "not called") or only named, with the tests and the plan concerned.
4. A human decides, and it is recorded
For each suite: replay or skip. A skip needs a reason, and every decision says who took it. The decision file is bound to the impact's fingerprint: faced with another transport, a decision is stale, never applied. As long as a suite that executes a transported object has not been skipped, the command exits with code 1: a CI pipeline cannot ignore it.
5 suites out of 22 really execute a transported object
On the flight reference transport (113 objects), a text search finds 22 suites; 5 really execute a transported object. The other 17 name it without executing it: the human skips them, with their reason. Ten validation tests, each on a real transport, run in 18 seconds.
682 points checked, none missed
The static graph was checked against a real Robot Framework dry run: 682 points, no keyword entered outside the graph. What the analysis cannot see (more than one level, dynamic SQL, object-oriented transactions, an unresolved import), the report says.
One decision, one reason, one name
The report carries the human decision in a "Human decisions" section, next to the proof of every proposed suite. A decision only covers the impact it saw: that is what makes it verifiable afterwards.
New in 0.8.7: fixed readers, the same public surface
The libraries keep the same public surface and gain fixes: readers that were wrong without knowing it now read what they announce.
Fixed readers, the same public surface
Read Audit Log Coverage reads the security audit log for real: it read no entry, so its zero proved nothing. Resolve Ui5 With Fallback refuses a repair that designates several controls, where it kept the first one. Get Ui5 Theme reads the theme from the loaded style sheets, Read Table Control drops the reserved blank rows at the end of a table, and the sid engine targets the deepest element that carries a SID. Still 393 public keywords, under the Apache 2.0 licence.
393 public keywords, each with its example
172 for SAP GUI, 90 for SAP Fiori, SAPUI5 and the WebGUI, 131 for OData and RFC/BAPI, plus 69 keywords in 22 shared modules (a table extracted in five formats, deterministic artifacts, user formats, business vocabulary). Each carries a usage example in Robot Framework code. Still under the Apache 2.0 licence.
Dialogs, ABAP lists, the embedded browser
Dismiss Information Dialogs closes the information dialogs that follow a logon, recognised by their structure and icon, never by their text. Read Abap List Summary and Double Click Abap List Cell read the summary block of the SM58, SMQ1 and SMQ2 monitors and open a cell by its content. Disconnect From Embedded Browser and Click Embedded Browser Element And Disconnect complete the bridge to the HTML control of SAP GUI 8.00, driven live over CDP.
Recorders, AI agents, maintenance: engineering demonstrators
Around the libraries, R&D work has produced demonstrators of know-how and engineering: tools that write, delegate and maintain tests, map an SAP system and tell what to replay before a release. They exist in earlier versions of the project, are not part of the open-source libraries and are not published; what they produce remains ordinary Robot Framework that runs without them.
Walk through a process, get a test
In SAP GUI for Windows as in the browser (SAP Fiori, WebGUI), the process becomes a replayable suite, a « resource and suite » pair, a plan, ISTQB test cases and an HTML report.
Score a request before the agents
A test request is a prompt: its form and template share are checked without any model call, eight criteria are judged by a model, local by default, and a read-only RFC probe says whether the SAP objects it names exist.
Plan, generate, repair, review
Five agents in Claude Code or GitHub Copilot, bounded by a mission contract, a permission hook and a handover trail for resuming after an interruption.
An AI assistant that sees the SAP screen
Three plugins for the rf-mcp server and the sapfx-mcp overlay: the SAP screen as text, as a diff or as an annotated image, the state read live, and approval by a human of a write to SAP.
See the drift before the failure
A sentinel suite to schedule, a drift report drawn from the healing telemetry, plan and convention guards; fixes touch only the resources layer.
What is connected to an SAP system, and what is active
A read-only RFC survey, reconciled by a rule with the application map and the interface register: two A3 plates, a report, one verdict per interface and, for each gap, its proof captured in SAP GUI.
Business keywords to adapt
Nine vocabularies, twenty-five page objects and twelve example suites, measured on development systems: examples to customise, not a universal vocabulary.
A test workstation ready with one command
A self-contained ZIP: pinned versions, integrity checked, MCP configuration written, optional RFC channel through the runtime SAP GUI 8.00 already installs.
What to replay before going to production?
The impact analysis of a transport, the GO or NO-GO verdict computed on the Robot Framework results file, and the keywords that drive the write policy, approval and audit trail.
When SAPFX fits, and when it does not
Families of SAP testing tools have neither the same scope nor the same model. This table places them without naming any; it also states the limits of SAPFX.
| Tool family | SAP GUI | SAP Fiori / SAPUI5 | OData / RFC | License | Test format |
|---|---|---|---|---|---|
| The market's proprietary testing suites | Yes | Yes | Depends on the product | Proprietary | Often codeless, vendor format |
| Automation tool built into SAP S/4HANA Cloud Public Edition | No | Yes | Yes | Included with the cloud edition | SAP standard scenarios, codeless |
| Existing open-source libraries for testing SAP GUI | Yes | No | No | Open source | Robot Framework |
| SAPUI5 test frameworks in JavaScript | No | Yes | No | Open source | JavaScript or TypeScript code |
| SAPFX | Yes | Yes, and SAP GUI for HTML | Yes | Open source (Apache 2.0) | Robot Framework, business keywords |
SAPFX fits if:
- ✓your tests must cross SAP GUI, SAP Fiori and the APIs in a single scenario;
- ✓you want readable tests, versioned and run in your own continuous integration;
- ✓your team already uses Robot Framework, or is willing to learn it;
- ✓you are looking for a successor to CBTA under an open-source license (Apache 2.0).
SAPFX does not fit if:
- ×you require a drag-and-drop graphical editor: SAPFX has none, a test is written as Robot Framework keywords that read without programming;
- ×your users work with SAP GUI for Java or on macOS: SapEccLibrary drives SAP GUI for Windows;
- ×you only use SAP S/4HANA Cloud Public Edition, whose built-in automation tool already covers the standard scenarios;
- ×you require contractual support from a software vendor: SAPFX is an independent open-source project, with no contractual support.
Writing, deleting, cross-checking: what the tool can do besides testing
A tool that can write a record, read it back through a second channel, delete it and confirm it is gone is useful for more than checking a system. Three uses open up. They are presented as a direction: what is proven and what remains to be built are stated side by side.
Generate test data sets
Create complete, consistent data sets, identifiable as test data, to feed test campaigns.
Status: direction, in the very short term. Already in place: the test data factory of the API channel and the creation cycles through the screen and through RFC.
Populate databases for performance testing
Populate empty or incomplete SAP databases before running a load campaign.
Status: direction. No volume campaign has been run and no loading time has been measured to date.
Configure and migrate data
Load complex business data to configure a target environment, or secure a data injection during a major migration, for example from ECC to S/4HANA, while checking the result through a second channel.
Status: direction. Writing, deleting and cross-checking through two channels are validated live; no migration has been run.
Automating SAP tests with Robot Framework: the common questions
The short answers; the details are in the FAQ and the keyword documentation.
What is SAPFX?
SAPFX (package robotframework-sapfx, version 0.8.7 on PyPI) is a set of three open-source Robot Framework libraries under the Apache 2.0 license to automate SAP testing: SapEccLibrary for SAP GUI for Windows, SapFioriLibrary for SAP Fiori apps, SAPUI5 and SAP GUI for HTML, SapApiLibrary for OData and RFC/BAPI. A single test can cross several of these channels.
Which Robot Framework libraries can automate SAP GUI?
SapEccLibrary, the SAP GUI library of SAPFX, drives SAP GUI for Windows through the SAP GUI Scripting API. It stays compatible with an existing open-source library, whose keywords it keeps, and counts 172 public keywords: ALV grids read in full, table controls, trees, fields addressed by their label, proof of the target system, several sessions by alias.
How do you test an SAP Fiori app with Robot Framework?
With SapFioriLibrary, on top of the Browser library (Playwright): SAPUI5 controls are addressed by their type and properties instead of generated DOM identifiers, Wait For Ui5 Idle waits until the page is truly idle, and launchpad apps open by their intent. The public OpenUI5 Demo Kit is enough to try it, with no SAP system.
Is there an open-source alternative to CBTA before the end of 2027?
SAPFX is one: CBTA scenarios are rewritten in Robot Framework, on SAP GUI, SAP Fiori and the APIs, under the Apache 2.0 license. Mainstream maintenance of SAP Solution Manager 7.2, which carries CBTA, ends on 31 December 2027. A migration guide from CBTA comes with the libraries; the rewrite remains real work.
Under which license is SAPFX published?
The libraries are published under the Apache 2.0 license: unrestricted use, modification and redistribution, whatever the number of users or execution machines.
Can you try SAPFX without an SAP system?
Yes, in part. SapFioriLibrary can be tried on the public OpenUI5 Demo Kit or on an SAP Fiori Elements app served locally. For SAP GUI and the APIs, the ABAP Platform Trial Docker image provides a complete SAP system on a workstation.
Can a single test check SAP GUI, SAP Fiori and the APIs?
Yes, that is hybrid testing: a test prepares through the API, acts on the screen and checks through an independent channel. Examples replayed: 205 products counted by SE16 and by OData, 19 orders shown by a launchpad tile and counted through RFC on a CDS view, the same price read through OData, the WebGUI and RFC.
How do you know which SAP tests to replay after a transport?
With the SAPFX change impact analysis, validated on S/4HANA 1909 and ABAP Platform 2023: published in version 0.8.5 of the libraries, still available on PyPI under the Apache 2.0 license. It reads the transport over RFC, read only, follows each object over one level of use (programs, transactions, CDS views, classes, function modules), then crosses the names with the Robot Framework suites by what each test really executes. A human then decides, suite by suite, to replay or to skip with a reason, and the decision is recorded, bound to the impact's fingerprint. On the flight reference transport, a text search finds 22 suites; 5 execute a transported object. No list of suites proves the absence of impact.
What does SAPFX 0.8.7 bring?
Published on PyPI, it keeps the same public surface (393 public keywords and 69 keywords of shared modules, each with a usage example) and fixes readers: Read Audit Log Coverage reads the security audit log for real (it read no entry, so its zero proved nothing), Resolve Ui5 With Fallback refuses a repair that designates several controls, Get Ui5 Theme reads the theme from the loaded style sheets, Read Table Control drops the reserved blank rows at the end of a table and the sid engine targets the deepest element that carries a SID.
Does SAPFX work with SAP GUI for Java?
No. SapEccLibrary drives SAP GUI for Windows through the SAP GUI Scripting API. A system reachable through SAP GUI for HTML is tested with SapFioriLibrary, in the browser.
Measured results and validation scope
Test SAP GUI, Fiori and OData/RFC APIs with Robot Framework. Published sources and measurement conditions are listed below.
- 0.8.7 published on PyPI pip install robotframework-sapfx, Python 3.10 or later, Robot Framework 7.4 or later. The package carries the three libraries. robotframework-sapfx 0.8.7 package on PyPI
- 393 documented public keywords 172 in SapEccLibrary (SAP GUI), 90 in SapFioriLibrary (SAP Fiori, SAPUI5, WebGUI), 131 in SapApiLibrary (OData, RFC/BAPI), version 0.8.7 as in 0.8.6, plus 69 in 22 shared modules; each carries a usage example in Robot Framework code. Keyword documentation (Libdoc)
- 664 live scenarios Aggregate of campaigns validated on four real SAP development systems (ABAP Platform 1909 and 2023, an SAP Build Work Zone site, the SAP Business Accelerator Hub sandbox); not one single run, nor a production system. Internal evidence manifest
- 5,616 unit tests Run without SAP on the development workstation for release 0.8.7; they check the libraries against local doubles, not a real SAP system. Internal run, release 0.8.7
- 95% coverage pytest-cov measurement for release 0.8.7 on the development workstation, 85% floor enforced; does not guarantee absence of business defects. Internal measurement, release 0.8.7
Published case: one price read through three channels
EPM laboratory case: OData, WebGUI SE16 and RFC, with target verification followed by value comparison. 7/7 scenarios on each ABAP 754 and 758 release, replayed 7/7. Limit: read-only.
Read the published release evidence