SAP Test Automation Guide: UTFx, Worksoft, and eCATT
SAP testing requires tools that understand SAP's proprietary GUI, transaction codes, and BAPI interfaces. This guide covers the three main automation approaches — UTFx, Worksoft Certify, and SAP's built-in eCATT — plus how to integrate them into CI pipelines.
SAP Testing Challenges
Testing SAP is fundamentally different from testing a standard web application:
- SAP GUI — the thick-client interface uses proprietary controls that Selenium cannot interact with
- Transaction codes — SAP navigation uses T-codes (e.g.,
MM01for material master creation), not URLs - BAPIs and RFCs — business logic often lives in BAPI function modules, not HTTP endpoints
- Data dependencies — SAP business processes have deep dependencies (vendor → purchase order → goods receipt → invoice)
- Landscape complexity — Development, Quality, and Production are separate SAP systems with transport-based promotion
Understanding these constraints determines which tooling fits your environment.
Option 1: SAP eCATT (Built-in)
eCATT (Extended Computer Aided Test Tool) is SAP's native testing framework, available in every SAP system without additional licensing.
When to Use eCATT
- You have SAP BASIS/ABAP access
- You're testing ABAP function modules, BAPIs, or dialog transactions
- You want tests stored directly in the SAP system (transport-managed)
- Budget is constrained — eCATT has no additional cost
Creating an eCATT Test Script
Access via transaction code SECATT:
- Create a test script (TS) — records SAP GUI interactions
- Create a test configuration (TC) — links the script to test data
- Create a test data container — parameterizes the test inputs
Example ABAP test script structure (eCATT uses a proprietary scripting language):
TDOBJTYPE = 'TSCR' " Test Script
TSCRNM = 'ZTS_CREATE_VENDOR'
TSCRVERS = '000001'
* Parameter definitions
PARAMS:
I_VENDOR_NAME TYPE LFA1-NAME1,
I_COUNTRY TYPE LFA1-LAND1,
E_VENDOR_NUM TYPE LFA1-LIFNR.
* Script body
CALL TRANSACTION 'MK01'
USING I_COUNTRY
CHANGING E_VENDOR_NUM.
CHECKV E_VENDOR_NUM <> ''.Calling BAPIs Directly in eCATT
For BAPI testing without GUI interaction:
* Test BAPI_VENDOR_CREATE
CALL FUNCTION 'BAPI_VENDOR_CREATE'
EXPORTING
COMPANYCODE = '1000'
VENDORNAME = I_VENDOR_NAME
IMPORTING
VENDORNO = E_VENDOR_NUM
TABLES
RETURN = LT_RETURN.
* Check for errors
CHECKV LT_RETURN[] IS INITIAL.Running eCATT Tests
Execute from SECATT or schedule via background job:
sm37 → Job: SECATT_BATCH → Program: RSECAT00Export results in JUnit format using custom ABAP report or third-party adapters.
Option 2: Worksoft Certify
Worksoft Certify is the most widely deployed commercial SAP test automation tool. It supports SAP GUI, Fiori (web), and integration testing in a single platform.
Worksoft Architecture
Worksoft Manager (server) → Certify Client → SAP System
→ Results Database
→ CI IntegrationCertify uses a keyword-driven approach where test steps are "Processes" — reusable action blocks:
Creating a Certify Process
- Open Certify and create a new process
- Select your SAP system from the connection manager
- Record interactions using the SAP GUI capture mode
Example process structure (shown in Certify's table view):
Process: Create Purchase Requisition
Step | Action | Component | Value
-----|-----------------|--------------------|---------
1 | Launch T-Code | ME51N |
2 | Set Field | Account Assignment | K (Cost Center)
3 | Set Field | Plant | 1000
4 | Set Field | Material | ${MATERIAL}
5 | Set Field | Quantity | ${QTY}
6 | Click | Save |
7 | Verify Text | Status Bar | HeldVariables use ${VARIABLE} syntax and are passed from test data sheets (Excel or internal datasets).
Reusable Process Libraries
Certify's power is in process composition:
MainScenario: Procure-to-Pay
→ SubProcess: Vendor.Create(vendorData)
→ SubProcess: PurchaseOrder.Create(poData)
→ SubProcess: GoodsReceipt.Post(grData)
→ SubProcess: Invoice.Verify(invoiceData)
→ SubProcess: Payment.Run(paymentData)Each subprocess is reused across hundreds of tests without duplication.
Certify CI Integration
Worksoft exposes a REST API for CI execution:
# Trigger a Certify test suite
curl -X POST https://worksoft-manager:8080/api/v1/executions \
-H <span class="hljs-string">"Content-Type: application/json" \
-H <span class="hljs-string">"Authorization: Bearer $WORKSOFT_TOKEN" \
-d <span class="hljs-string">'{
"projectId": "saptest-proj-001",
"suiteId": "procurement-regression",
"environment": "QA",
"parameters": {
"PLANT": "1000",
"COMPANY_CODE": "1000"
}
}'
<span class="hljs-comment"># Poll for results
curl https://worksoft-manager:8080/api/v1/executions/<span class="hljs-variable">$EXECUTION_ID/results \
-H <span class="hljs-string">"Authorization: Bearer $WORKSOFT_TOKEN"In Jenkins:
pipeline {
agent any
stages {
stage('SAP Regression') {
steps {
script {
def resp = httpRequest(
url: "${WORKSOFT_URL}/api/v1/executions",
httpMode: 'POST',
authentication: 'worksoft-credentials',
requestBody: groovy.json.JsonOutput.toJson([
projectId: 'sap-tests',
suiteId: env.BRANCH_NAME == 'main' ? 'full-regression' : 'smoke',
environment: 'QA'
])
)
def executionId = readJSON(text: resp.content).executionId
// Poll until complete...
}
}
}
}
}Option 3: UTFx (Unified Test Framework)
UTFx is SAP's newer cloud-based test management and automation solution, integrated with SAP Cloud ALM. It's the strategic replacement for older SAP testing tools for S/4HANA Cloud customers.
UTFx vs. eCATT
| Feature | eCATT | UTFx |
|---|---|---|
| Deployment | On-premise SAP system | Cloud-based (SAP Cloud ALM) |
| Target system | SAP GUI / ABAP | S/4HANA Cloud, BTP |
| Recording | SAP GUI capture | Fiori UI capture |
| Data management | ABAP data containers | Cloud-based datasets |
| CI integration | Custom ABAP reports | REST API |
Setting Up UTFx
- Enable UTFx in SAP Cloud ALM tenant
- Install the UTFx recorder browser extension (Chrome/Edge)
- Connect to your S/4HANA Cloud system
Recording a UTFx Test
UTFx records interactions with Fiori apps directly in the browser:
- Activate recording mode in Cloud ALM
- Navigate to the Fiori launchpad
- Execute the business process (e.g., create a sales order)
- Stop recording — UTFx creates a structured test script
The generated script uses SAP's element metadata (control IDs from SAP UI5 framework) rather than fragile CSS selectors.
Running UTFx in CI
# Using SAP Cloud ALM API
curl -X POST <span class="hljs-string">"https://$ALM_TENANT.alm.cloud.sap/api/v1/test-runs" \
-H <span class="hljs-string">"Authorization: Bearer $ALM_TOKEN" \
-H <span class="hljs-string">"Content-Type: application/json" \
-d <span class="hljs-string">'{
"testPlanId": "TP-001",
"environment": "QA",
"scope": "regression"
}'Choosing the Right Tool
| Scenario | Recommended Tool |
|---|---|
| SAP ECC on-premise, ABAP-heavy | eCATT |
| SAP ECC/S4 with SAP GUI, large test library | Worksoft Certify |
| S/4HANA Cloud with Fiori | UTFx |
| Mixed landscape with non-SAP systems | Worksoft Certify |
| Budget-constrained, simple BAPI tests | eCATT |
Many enterprises use multiple tools: eCATT for ABAP unit tests, Worksoft for end-to-end scenarios, and UTFx for cloud-native S/4HANA.
Integration Testing Between SAP and External Systems
SAP frequently integrates with external systems via IDocs, BAPIs, or REST APIs. Test these integration points:
Testing IDoc Processing
# Using pyrfc library to test BAPI/RFC calls
import pyrfc
connection = pyrfc.Connection(
ashost='sap-dev.internal',
sysnr='00',
client='100',
user=os.environ['SAP_USER'],
passwd=os.environ['SAP_PASSWORD']
)
# Call BAPI directly
result = connection.call('BAPI_SALESORDER_CREATEFROMDAT2',
ORDER_HEADER_IN={
'DOC_TYPE': 'OR',
'SALES_ORG': '1000',
'DISTR_CHAN': '10',
'DIVISION': '00'
}
)
# Assert
assert result['RETURN'][0]['TYPE'] not in ('E', 'A'), \
f"BAPI failed: {result['RETURN'][0]['MESSAGE']}"Monitoring SAP API Health
After deployments, verify SAP integration endpoints stay healthy:
helpmetest health sap-bapi-vendor-create 5mSummary
SAP test automation requires matching your tool to your landscape:
- eCATT for ABAP-level tests in on-premise SAP without additional licensing
- Worksoft Certify for enterprise-scale SAP GUI and end-to-end integration testing
- UTFx for S/4HANA Cloud and Fiori-first environments
All three integrate with CI pipelines, but the maturity of that integration varies. Worksoft offers the most complete CI/CD support, eCATT requires custom ABAP reporting, and UTFx relies on Cloud ALM's REST API.
Start with smoke tests covering your most critical business processes (order-to-cash, procure-to-pay), then expand coverage based on regression failure frequency.