Academy · ABAP & RAP Development · 300 Professional
Testing RAP Business Objects: EML Scenario Tests, Behavior Test Doubles and Draft
A code-level course on unit and component testing of RAP business objects: EML scenario tests with CDS and SQL test doubles, isolating validations, determinations and actions with the transactional buffer double and the mock EML API, testing draft-enabled and late-numbered BOs, proving feature control, authorization and messages, and the test standard and ATC/ABAP Unit gate a test lead should demand before a RAP app is promoted. Built on Contoso Motor Co.'s core return agreement BO.
- 66 minutes
- 6 lessons + quiz
- ABAP / RAP Developer, Test Automation Engineer, Test Lead / Test Manager
Start the course
- 01What to test in a RAP BO and at which layer11 min
- 02EML scenario tests: setup, COMMIT ENTITIES and teardown with ROLLBACK ENTITIES11 min
- 03Isolating behavior: transactional buffer and CDS test doubles11 min
- 04Testing draft, late numbering and side effects11 min
- 05Authorizations, feature control and messages11 min
- 06A RAP test standard for code review and quality gates11 min
- QZCourse quiz15 questions
What you’ll be able to do
- Write EML scenario tests that exercise a BO's create, update, action and save sequence
- Isolate a single determination or validation with behavior and CDS test environments
- Test draft-enabled BOs, including activation and draft-only validations
- Handle late numbering, side effects and authorization checks in tests
- Define a reviewable RAP test standard and ATC/coverage gate
Sources and further reading
- Write an ABAP Unit Test for the RAP Business Object (RAP100 tutorial) · SAP Developer Center
- ABAP cheat sheet: ABAP Unit Tests · SAP Samples on GitHub
- ABAP cheat sheet: ABAP EML in ABAP for RAP · SAP Samples on GitHub
- ABAP Keyword Documentation: COMMIT ENTITIES · SAP Help Portal
- ABAP Keyword Documentation: CDS BDL, draft actions · SAP Help Portal
- ABAP Keyword Documentation: CDS BDL, late numbering · SAP Help Portal
- ABAP Keyword Documentation: CDS BDL, with draft · SAP Help Portal