From Manual Testing to Enterprise Automation | Part 2
Beyond Low-Code: Building Reliable SAP Test Automation with Tricentis Tosca
In this series
Part 1 — Before You Automate: Understanding SAP Beyond the User Interface
Part 2 — Beyond Low-Code (You are here)
Coming from a manual testing background, I initially thought that learning an automation tool meant learning how to reproduce the actions I performed on screen. SAP made me reconsider that assumption. A test can follow every step correctly and still fail to establish whether the underlying business process worked as intended.
In Part 1 of this series, I explored why understanding SAP, its business processes, and the state of its test data matters before automation begins. Once those foundations are in place, the next challenge is turning that understanding into tests a team can run repeatedly and maintain over time.
What interests me about Tricentis Tosca is that its model-based approach makes automation accessible without requiring extensive programming for many common tasks. It does not, however, remove the need for sound engineering decisions. In this article, I want to share the design principles I would use to build a reliable SAP regression suite with Tosca Commander, and explain why they matter beyond the first successful run.
Understanding the model-based approach
One of the first distinctions I had to understand was the difference between a Module and a TestCase. In Tosca, a Module represents the technical elements needed to interact with an application. When we create a TestStep from a Module, we specify how its controls should be used. A TestCase brings those steps together to perform a scenario and verify its expected behavior. [1]
Take SAP login as an example. A Module might describe the username field, password field, and login button. A TestStep supplies the values and actions; the TestCase determines why the session is needed and what should happen next. Requirements help organize coverage, TestCase-Design helps model test data and variations, and ExecutionLists organize tests for execution. These are different responsibilities, not simply different folders in the same tool. [2] [3]

For SAP GUI for Windows, I would check the technical prerequisites before scanning any controls. Tosca’s SAP Engine 3.0 uses the SAP GUI scripting interface, which requires appropriate client and server configuration. Supported software versions, the correct test system and client, and user authorizations also matter. These settings should be confirmed with the system administrators rather than changed independently. [4]
Once the environment is ready, I would scan and identify controls with stable technical properties wherever possible. Reusing a well-designed Module makes future changes easier to manage. Creating a new Module every time a test visits the same screen, on the other hand, duplicates the work of maintaining that application model.
Reuse common operations without hiding business logic
Imagine a regression suite in which dozens of SAP scenarios need to log in, navigate to a transaction, and search for a record. If every TestCase contains its own copy of those operations, a small interface change can lead to unnecessary maintenance across the suite.
Tosca provides Reusable TestStepBlocks for sequences of TestSteps that can be referenced by multiple TestCases. A shared login block, for example, can use the appropriate Modules, establish the required session, and check that the expected starting screen is available. The individual business scenarios can then reference that block rather than recreate the same sequence. [5] [6]

I would apply the same approach to transaction navigation, record searches, and other genuinely repeated operations. The important part is keeping the responsibility of each component clear. A document search block should receive an identifier and locate the corresponding record; it should not try to decide whether every possible business outcome is correct. Those scenario-specific assertions belong in the business test or a suitably focused verification block.
Business Parameters help make a reusable block’s inputs explicit. I would also review its dependencies before changing a shared component. A live reference and a resolved copy are not equivalent, and generated TemplateInstances need particular attention because Tosca can resolve references during instantiation. Understanding that relationship prevents a team from assuming that every existing test will automatically pick up a shared change. [5] [7]
Give every TestCase a readable structure
A TestCase should tell a recognizable business story, even before someone opens its individual TestSteps. I find it helpful to organize a scenario around five responsibilities: preconditions, navigation, business actions, verification, and postconditions. This is a design convention, not a required Tosca hierarchy.

For a meter reading scenario, the preconditions might establish the correct SAP session and confirm that the installation and reading date are suitable. The business actions submit the reading, and the verification checks the stored record and its expected processing status. Postconditions deal with session state or approved cleanup when necessary. The exact checks depend on the business rules and the objective of that particular scenario.
The same principle applies to the repository. I would organize Modules by application and screen or transaction, and group TestCases by business process. Reusable components, configuration, and data assets should have predictable names and ownership. A clear structure should make it easier to find an existing component and understand its dependencies, rather than introduce extra layers for their own sake.
Choose the data mechanism according to the value’s purpose
Test data was one of the areas where Tosca started to make more sense to me once I understood that not every value serves the same purpose. Test Configuration Parameters (TCPs) are useful for settings such as the target SAP system or client when the automation is designed to consume them. Business Parameters pass values into reusable operations. TestCase-Design can model business inputs and scenario variations for use with templates. Buffers, by contrast, are particularly useful for retaining values captured during execution. [5] [2] [8] [9] [10]
A sales order is a useful example. In SAP, VA01 creates a sales order and VA03 displays an existing one. Suppose a test creates an order for a known customer, material, and quantity. When the order is successfully saved, SAP assigns a document number. Instead of hard-coding a number for the display step, I would capture the number from a suitable field using the Buffer ActionMode, with SalesOrderNumber as the buffer name. If it is embedded in a message, an XBuffer may be appropriate when the message pattern and control support it. The expression {B[SalesOrderNumber]} then retrieves the captured value when opening the order in VA03. [11] [9] [10]

Here, the customer, material, and quantity are business inputs. The SAP system and client are execution configuration, and the newly assigned order number is a runtime output. Treating those values differently makes the test easier to understand and reuse. It also helps prevent a misleading pass caused by accidentally opening a document left over from an earlier run. Sensitive credentials, meanwhile, should follow the organization’s approved secure credential-handling process.
Dynamic values are not a substitute for valid test data. Generating a random meter identifier, for example, does not guarantee that an available meter exists in SAP. As discussed in Part 1, state-changing scenarios need an agreed way to obtain suitable records, avoid conflicts with other executions, and handle any necessary cleanup or replenishment.
Verify the outcome, not merely the operation
A green execution result is useful only when the assertions behind it are meaningful. Consider the sales order example again. A success message confirms that SAP reported a successful operation. If the test objective is to verify the information saved in the order, I would reopen the newly created document and compare the relevant customer, material, and quantity with the expected values. This establishes more than the fact that the save button was clicked.
The distinction becomes especially important in data integration. In SAP BW, a Data Transfer Process (DTP) moves data between source and target objects and can run as part of a process chain. A successful processing status provides operational evidence, but it does not establish that every business value was transformed correctly. [12]
Consider a fictional transformation that converts consumption from megawatt-hours to kilowatt-hours:
| Record | Source (MWh) | Expected (kWh) | Actual (kWh) |
|---|---|---|---|
| A | 1.0 | 1,000 | 1,000 |
| B | 2.5 | 2,500 | 250- incorrect |
| C | 3.0 | 3,000 | 3,000 |
All three records reached the target, but one contains an incorrect value. A test that verifies only the job status and record count would miss this issue. Depending on the objective, I would compare business keys and relevant field values, reconcile expected totals, and check for missing or duplicate records. The expected values should come from a trustworthy source, such as an approved business rule, a controlled reference dataset, or an independent calculation. Verification should be strong enough to support the conclusion the test claims to establish.
Synchronize with the actual processing state
Enterprise processes do not always finish when a screen becomes available. A transaction may start a background job, or a change may take time to reach another system. This is where synchronization becomes more than a question of waiting for a button or a field.
Suppose a test waits thirty seconds after starting a job. If the job finishes in ten seconds, the test wastes twenty seconds. If the job takes forty-five seconds, the test starts verifying too early. Increasing the delay may reduce some intermittent failures, but it still does not establish whether the required process has finished.

For an SAP background job, SM37 is one possible monitoring point. Where appropriate, an automated scenario could identify the job instance associated with its own execution and perform bounded status checks. It should distinguish successful completion from cancellation or timeout and then perform any required business verification. Checking an unrelated job with a successful status would prove very little. [13]
Tosca’s WaitOn ActionMode can wait for a supported control value or property to reach the expected state, subject to the configured timeout. It is useful when the application exposes a suitable readiness condition. If a job overview does not update automatically, however, WaitOn alone may not be enough; the workflow may need a controlled refresh or polling mechanism. I would prefer an observable condition to an arbitrary delay wherever the application and engine support it. [9] [14]
Investigate failures before changing the automation
When a test fails because a control cannot be found, rescanning the Module may seem like the quickest response. But the control might be missing because a previous action led to a different screen, a popup is blocking the session, or the selected record is locked. Changing the identification properties would not address those causes.
I would begin with the failing step and work backward: What action preceded it? Which screen was actually displayed? What data did the test use? Was there an SAP status-bar message or a background-processing error? That evidence helps distinguish an object-recognition or synchronization problem from unsuitable data, missing authorization, an environment issue, or a genuine application defect.
Recovery Scenarios can help address certain execution failures, while Tosca’s Engines 3.0 CleanUp Scenarios are intended for situations where recovery fails. Neither should be used to hide a failed business assertion. In particular, retries need careful design for state-changing operations: before repeating a save or submission, establish whether the first attempt has already created or changed a record. [15]
Build something the next engineer can maintain
A regression suite is an operational asset, not just a collection of scripts delivered at the end of a sprint. It needs clear ownership, repeatable execution procedures, review practices, and sufficient evidence to diagnose failures. For a shared Tosca repository, I would agree on check-in/check-out practices, the review of shared Modules and reusable blocks, and recoverable backups with the team.
I would also look beyond the number of automated tests when assessing progress. Business coverage, repeatability, failures caused by automation or the environment, maintenance effort, and execution time provide a more useful picture when measured consistently. A test that passes once but needs manual data repair before every subsequent run has not yet delivered the repeatability we want from regression automation.
Looking back at both parts of this series, I have come to see SAP automation as a combination of two disciplines: understanding what the business needs to prove, and designing a technical solution that can prove it consistently. Tosca makes many implementation tasks more approachable, but the quality of the result still depends on the decisions we make as testers. That is the kind of automation I want to build: understandable, repeatable, and useful to the person who maintains it next.
Missed the first article? Part 1 — Before You Automate: Understanding SAP Beyond the User Interface explores the business and testing foundations behind these design decisions.
References
[1] Tricentis — Create and manage Modules.
[2] Tricentis — Work with TestCase-Design.
[3] Tricentis — Plan, create and execute tests.
[4] Tricentis — SAP Engine 3.0.
[5] Tricentis — Reusable TestStepBlocks.
[6] Tricentis — Best practices: Repetitions and reuse.
[7] Tricentis — Combining TestCase templates with data sources.
[8] Tricentis — Create test configuration parameters.
[10] Tricentis — Text expressions.
[11] SAP Help Portal — Transactions in EWM and ERP.
[12] SAP Help Portal — Creating a Data Transfer Process.
[13] SAP Help Portal — How to maintain and monitor background jobs via SAP.
[14] Tricentis — Best practices: Wait times.
[15] Tricentis — Best practices: Error handling.
References consulted 28 November 2026. The technical references use Tricentis Tosca 2026.1 documentation where applicable; check the documentation for your installed version. The examples and AI-assisted illustrations are simplified for educational purposes and do not represent client screenshots or actual execution results.