Unit testing
Testing ABAP logic without a running business process — and the test doubles that make dependencies on the database and on framework services tractable.
Showing artifacts, examples and content with confirmed ABAP Cloud applicability. View All ABAP
Overview
ABAP Unit and its test double frameworks run unchanged in ABAP Cloud. SAP's own RAP400 workshop writes ABAP Unit tests for a RAP business object from an ABAP Cloud project on a BTP ABAP Environment trial system, doubling its CDS entities for reads with the CDS Test Double Framework and its database tables for writes with the ABAP SQL Test Double Framework, and the abap-cheat-sheetsSAP-samples/abap-cheat-sheetsA collection of ABAP syntax cheat sheets, from internal tables to RAP's Entity Manipulation Language, each backed by an executable demo class you import into an ABAP system with abapGit.sap official, abap unit-testing examples target the same environment.
Not covered: A test double can only stand in for an object the code under test is allowed to reference, so it inherits ABAP Cloud's general restriction to released repository objects: an unreleased table or CDS entity is as out of reach for a test double as it is for production code.
Read from the artifacts that state abap-cloud: abap-unit-runnerabap-unit-runnerAn application job that runs and schedules ABAP Unit tests in SAP's ABAP Environment through the SAP_COM_0735 API, where the on-premise test runner has no SAP GUI to run from.independent, abap and abap-test-containerabap-test-containerA test data container for ABAP Cloud that loads unit test data in JSON, XML or raw formats from GitHub and maps it onto the target structure, filling the platform's missing native one.independent, abap.
Test runners and test containers from outside SAP that state ABAP Cloud add to ABAP Unit here.
Artifacts
Seen working
Details
Coverage
For your agent
- Ref
capability:abap-unit-testing- JSON
- /capabilities/abap-unit-testing.json
- MCP
- Connecting an agent