Skip to main content

๐Ÿ—๏ธ Architecture and Security

AI@Test tests SAP the way a tester does: through SAP GUI, on a real test system. Its architecture rests on one principle: the AI works when a case is learned, at its first run (and again on "Recompile"), and every replay after that is deterministic and spends no AI tokens. This page presents the building blocks, follows a case through them, and explains how your data and access are protected and what your SAP team prepares.

The building blocksโ€‹

ComponentRoleWhere it runs
Web applicationThe screens of AI@Test (App, Setup, Admin, Help), in English or FrenchThe user's browser, served by the hub
HubThe AI@Test server: it keeps the cases, the cycles and their results, and hands each run to an execution agentMicrosoft Azure
Execution agentA Windows machine with SAP GUI that drives the SAP session for the runs, one session at a timeA Windows machine that reaches your SAP system, in your network next to SAP, as agreed for the deployment
SAP GUI driverThe software that drives SAP GUI through COM and exposes its actions over MCP (Model Context Protocol); the hub pins its exact versionOn the execution agent
Replay enginePlays a compiled trace, step by step, without AIInside AI@Test
AI agentCompiles a case at its first execution, with ClaudeCalled by the hub
ADT (optional)Read-only SQL access to SAP, for the database proof and some readsYour SAP system, through a read-only service account
Azure platformDatabase, file storage, key vault, telemetry and identity of the hubMicrosoft Azure

AI@Test is a pure MCP client of the SAP GUI driver: it touches SAP only through the driver on the execution agent, and through ADT when your SAP team opens it.

From a Gherkin case to a resultโ€‹

  1. A case enters in Gherkin. It is imported from a Gherkin file (.feature or .md), or recorded from SAP GUI on a recording station when your instance offers it. An imported case starts "To compile". Generating cases with the agent is on the roadmap.
  2. The first run compiles it. The hub opens the SAP session itself, with the test account the resolution rule picks, and hands it to the AI agent. The agent reads the Gherkin, drives SAP GUI through the driver, reads each screen and the SAP status bar, and writes the trace: execute-and-record. A recorded case imported with its trace already carries it, drawn from the person's actions without AI; its first run validates it.
  3. The bar decides. Before a trace enters the catalog, it passes its checks: its form, the proof of each Then, then two replays without AI that must pass.
  4. Every later run is a replay. The replay engine plays the trace through the driver: no AI, no tokens, a stable verdict.
  5. Each run keeps its evidence. Each step keeps the SAP status bar, and a screenshot when "Record the run (a screenshot at each step)" is ticked, which it is by default; otherwise only the screen of a failure is captured. A trace that creates data proves it in the database.
  6. Failures become defects. A deviation reported by SAP opens a defect, with the exact finding of SAP. An infrastructure failure is not a defect: the test execution freezes on an INFRA verdict, and nothing is charged to the cases.

Compile once: the agentic compilationโ€‹

  • The AI agent runs on Claude, Anthropic's model, through the Claude Agent SDK. The deployment sets how the model is reached: a Claude deployment on Microsoft Azure (Microsoft Foundry), or the Anthropic API.
  • The SAP session belongs to the hub: the agent never opens, closes or resets it, and neither the agent nor the model ever sees a SAP user or password.
  • A compilation spends tokens; its cost is counted and shown. Each compilation has its own spending cap, and the instance has daily and monthly caps, shown in Admin.
  • When a screen changes, "Recompile" has the AI agent compile the case again. A case whose Gherkin or connection changed becomes "Stale ยท recompile": its next run recompiles it.

Replay without AI: the deterministic engineโ€‹

  • The replay engine makes no AI call. This is an invariant of the product, enforced by automated code guards at every build.
  • A replay is free, and its verdict is stable.
  • A trace is stored as readable text (YAML), never in an opaque format.
  • When the launcher ticks "Allow AI Agent to adapt test data in case of issues" and holds the permission, the replay may adapt a perishable value, a date or a document number from a closed allowlist, by fixed rules and without any call to the AI model. An adaptation never touches a Then, it is logged with its value before and after, and its step reads "Recovered". Scheduled runs never adapt.
  • Schedules run in replay only: a case to compile, or stale, is set aside with its reason.

Where the AI model is used, and where it is notโ€‹

Uses the AI modelNever uses the AI model
Compiling a case at its first run, and "Recompile"Replaying a trace, including adapting test data
The Consistency check"Check rows", which runs fixed queries
"Fetch test data"Scheduled runs
Generating the user guide of a caseRecording a case in SAP GUI
Proposing the links between the cases of a cycleRunning the connection test

Reading SAP: evidence and database proofโ€‹

  • Every trace that creates data must carry a database proof: a read that proves the created data is present, either an SQL query through ADT or a table read through SAP GUI. A trace without it is refused.
  • A cycle can run with unverified proof: no database proof is played and only the screen judges. Each of its runs carries the mark "unverified proof", and still counts fully for defects.
  • ADT is optional. When your SAP team opens it, AI@Test uses it read-only, and accepts a database proof from it only when ADT declares that it serves the same system and client as the session: a proof is never read on another system.
  • Without ADT, the database reads go through SAP GUI, with the table display transaction SE16N in read-only mode.
  • A Then is anchored when the trace proves it by a reliable reading of SAP: a message key, the value of a field or a read of the database. A passed run whose Thens are not all anchored reads "Passed ยท x/y Then anchored", grayed out, and counts apart under Blocked.

Execution agents, the driver and the laneโ€‹

  • The execution agent is a Windows machine where SAP GUI and the SAP GUI driver run. The driver drives SAP GUI through COM and exposes its actions over MCP.
  • The hub pins the driver's exact version and build. An agent serving another version fails the connection test, and a run on it freezes the cycle on an INFRA verdict, charging nothing to the cases.
  • Only one run at a time drives SAP: this is the lane. Other launches wait in the queue.
  • A health probe watches each agent. The "MCP SAP GUI" pill in the header and the Platform card show it online, offline or not probed. An agent that is switched off or unreachable freezes runs on an INFRA verdict: report it to support, it is not a defect.

Hosting on Microsoft Azureโ€‹

Each customer has its own deployment: its own hub, database, secrets and execution agents. Several SAP systems of one customer are several connections of the same deployment; there is no multi-tenancy.

ComponentWhat it does
Secure front endThe only exposed component: TLS, and Microsoft Entra ID sign-in before anything reaches the hub
HubThe AI@Test server and its web application
Azure Database for PostgreSQLThe product data, reached through Entra only, with TLS verified
Azure Blob StorageScreenshots, evidence, exports, logs and user guides, with a retention set per kind of content
Azure Key VaultThe master keys: encryption of the test account secrets, and signing
Application InsightsTelemetry and operational alerts, in codes and numbers only
Managed identityThe hub's access to the database, storage, vault and telemetry, without any password
Claude model deploymentThe AI model the agent calls, deployed on Microsoft Azure (Microsoft Foundry)

Securityโ€‹

Sign-in with Microsoft Entra IDโ€‹

  • People sign in with their organization's Microsoft account (Entra ID). AI@Test asks for no password and no code: two-step verification is Microsoft's.
  • Entra ID says who; the role in AI@Test says what. An Entra identity without an active AI@Test user is refused, never created on the fly.
  • Access opens in two steps: an Admin declares the user, then the user is assigned to the AI@Test application in Entra. Only the Entra tenants and email domains admitted by the instance get in.
  • A user deactivated in AI@Test is refused from their next request.
  • The first Admins are named when the instance is deployed.
  • Machine identities, for automation through the API, sign in with their token, never through the sign-in page.
  • Each user picks English or French for the interface; the choice is theirs alone and follows them to their next session.

Roles checked by the serverโ€‹

Three roles (Admin, Tester, Auditor) and eight permissions apply to every action. The screen hides what a role cannot do, but the hub is the guard: it refuses an action without its permission, and writes the refusal to the audit.

Secretsโ€‹

  • Test account secrets and agent tokens are encrypted at rest with master keys kept in Azure Key Vault: the database alone is not enough to read them.
  • A secret is never shown again once saved: the screen only says whether it exists.
  • A test account secret is decrypted only when it is needed, and goes only to the driver: never to a log, the audit, the queue or the AI model.
  • A SAP password only goes to a driver the hub declares.
  • Each endpoint of the driver is protected by its own token, and the Platform card flags an endpoint that is not.
  • A secret that no longer decrypts is never guessed: the operation is refused until someone types the secret again.

What the AI model receivesโ€‹

  • During a compilation, the agent reads the Gherkin of the case (entered values included), the screens of the tested system and the driver's answers, and all of it goes to the model, including the business data a screen shows, such as a customer name or an address. No password or secret goes to the model: the hub opens the SAP session itself.
  • The Consistency check sends the model the master data its column allowlist reads, such as customers and materials.
  • "Fetch test data" sends the identifiers of the case and the connection, the typed fields a person ticked (customer, material, plant, storage location, sales organization, distribution channel) with their values only when they were read present, the case's typed fixed values read present in the same way, and the reads of its own column allowlist: never a name, an address, a SAP user, a tax identifier or free text.
  • The user guide of a case is written from the SAP screens of its last green replay with step screenshots, its Gherkin, its trace and its test data. The resulting PDF is an internal, unmasked document.
  • "Check rows" sends nothing to the model.

Your data processing agreement should describe these flows.

Production protectionโ€‹

AI@Test never runs on Production. The connection test reads the SAP client category: a connection classified Production cannot be saved, and a connection whose last test classified it Production gets no run and no Consistency check. A connection whose classification was never read gets no run until a test reads it.

Audit and telemetryโ€‹

  • The audit trail records every sensitive action and only grows. It never holds a password, a token, the login of a test account or the SAP connection string.
  • The telemetry sent to Application Insights carries codes and numbers only: never a secret, a login, the target of a connection or the text of a run.

Prerequisites on the SAP sideโ€‹

Your SAP and IT teams prepare the following for a deployment.

PrerequisiteDetailRequired
Windows execution agentA Windows machine that reaches SAP, with SAP GUI 8.00 or 8.10 (64-bit) and the SAP GUI driver in the version the hub pinsYes
SAP GUI automationThe SAP parameter sapgui/user_scripting = TRUE on the tested system (development or quality), never in Production. If sapgui/user_scripting_per_user = TRUE, the accounts also need S_SCR with activity 16.Yes
ConnectionsFor each system: host, instance, client and logon languageYes
SAP accountsThe hub account, used when no test account applies, and the test accounts of the testers. An Admin enters them in AI@Test; their secrets are encrypted. Without ADT, the accounts that replay also need S_TCODE for SE16N and S_TABU_NAM with activity 03 on the tables their database proofs read.Yes
Read through SAP GUIA service account (type S) per system, dedicated to the Consistency check, with read-only authorizations: S_TCODE for SE16N and SU3, and S_TABU_NAM with activity 03 on the tables read. SE16N must not be locked, and each logon must keep at least two free SAP GUI sessions.Yes
ADTThe ICF service /sap/bc/adt active, a read-only developer-type service account, and a system license that allows it (not a runtime edition)No
IdentitiesYour Entra tenant admitted by the hub, and the first administratorsYes
AI modelA Claude model deployment on Microsoft Azure (Microsoft Foundry)Yes, to compile and for the other AI features
NetworkThe execution agent sits in your network, next to SAP; the hub reaches it inside your network or through an encrypted overlay, as agreed for the deploymentYes
Data processing agreementIt describes what the AI model receives (see above)Yes
The first proof

Once the prerequisites are in place, an Admin declares the connection and runs its connection test. A test that passes without a failed check shows that the agent, SAP GUI, the automation parameter, the logon, the screen reading, the Production classification and the pinned driver are all in order.