UiPath Documentation
test-manager
latest
false
Test Manager-Benutzerhandbuch
Wichtig :
Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

SAP test automation best practices

Best practices for structuring SAP test automation projects in Test Manager and Studio: project structure, reusable components, and activity choices that reduce maintenance effort.

Building automated test cases for SAP applications is fast and reliable, but SAP's complexity can affect both the stability of your automations and the effort needed to maintain them over time. These guidelines keep SAP test projects simple to understand, easy to extend, and cheap to maintain. For the Studio-side steps that connect an automation to a test case, see Automate test cases.

A well-structured SAP test automation project gives each part a single, clear responsibility:

  • Execution template: a WinGUI-specific template that handles environment cleanup and starts SAP before a test case runs.
  • Helpers: reusable workflows that fetch credentials and log in to SAP.
  • Reusable components: automation building blocks, typically one per SAP transaction, callable from multiple test cases.
  • Test cases: the top-level workflows that assemble helpers and reusable components into an end-to-end scenario.

Separating test data from automation logic

The data a test case needs stays apart from the sequence of steps that executes it:

  • Preparing test data: assigning the test data (order type, sales organization, distribution channel, and similar values) at the start of the test case.
  • Sequencing automations with verifications in between: invoking each reusable component in order, with a Verify Expression step after each one confirming the expected result before moving on.

A Given-When-Then structure isn't needed for SAP test cases — the data preparation and automation sequence shown below is sufficient.

Using SAP transactions as reusable components

SAP transactions are natural boundaries for reusable automation sequences:

  • Starting each component from the SAP Easy Access window.
  • Using SAP-specific activities where available — they enrich the standard UI Automation activities (Click, Get Text, and others) with SAP-aware behavior.
  • Exiting the transaction to return to the SAP Easy Access window before the component finishes, so the next transaction in the sequence can continue from a known starting point.

Hinweis:

The Heatmap measures coverage per SAP transaction. If your automation isn't structured with one reusable component per transaction, coverage shown in the Heatmap can look inflated or incomplete relative to what you actually verified.

Using a WinGUI execution template

A WinGUI-specific execution template running before every test case puts the environment in a known state:

  1. Closing any SAP instance that's still running, for example with Kill Process on saplogon.exe.
  2. Logging in to SAP using a reusable helper workflow.

Choosing Simulate over Hardware Events

Simulate is the recommended input mode for SAP automation, set at the project level under Project Settings > UI Automation Modern > Targeting methods - SAP. It's faster and more reliable than Hardware Events for most SAP controls.

Controls that don't support Simulate

Some fields raise a "writing text with Simulate is not supported" error. Switching that specific activity's Input mode to Hardware Events resolves it, without changing the project-level default.

Choosing SAP-dedicated activities over generic activities

SAP-specific activities are generally the better choice over generic UI Automation activities — they're built to understand SAP controls and are more resilient to change than generic equivalents.

Navigation and screen activities:

  • Call Transaction
  • Click Picture on Screen
  • Click Toolbar Button
  • Select Menu Item
  • SAP Login
  • SAP Logon

Table and tree activities:

  • Expand ALV Hierarchical Table (ABAP List Viewer)
  • Expand ALV Tree
  • Expand Tree
  • Table Cell Scope

Data and status activities:

  • Read Status Bar
  • Select Dates In Calendar

End-to-end test case example

A single end-to-end test case can chain SAP transactions inside one session: logging in with SAP Logon, assigning the test data with Multiple Assign, then running the reusable component for each transaction in sequence — for example, VA01, VKM1, VL10H, VT01N, VT02N, VL02N, VI01, VF01, and BF03 — returning to SAP Easy Access before the next transaction starts.

Zusammenfassung

Keeping SAP test automation projects simple reduces the effort needed to maintain them over time:

  • A project structure that's easy to understand.
  • Repeatable logic moved into reusable components, each with a single responsibility.
  • No time spent building for requirements you don't need yet.

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support

Möchten Sie lernen? UiPath Academy

Haben Sie Fragen? UiPath-Forum

Auf dem neuesten Stand bleiben