Academy · ABAP & RAP Development · 200 Practitioner
ABAP Unit Testing and Test Doubles
Teaches developer testing in ABAP: why tests at the developer level save programs time, how to write ABAP Unit test classes with fixtures and assertions, how to design code for testability with interfaces and dependency injection, which of SAP's test double frameworks replaces which dependency (classes, database tables, CDS views, function modules, authority checks and RAP business objects), and how to read code coverage and run unit tests in ATC-based quality gates.
- 51 minutes
- 5 lessons + quiz
- ABAP / RAP Developer, Test Automation Engineer
What you’ll be able to do
- Write ABAP Unit tests with fixtures and assertions
- Design testable code using dependency injection
- Use SQL and CDS test doubles
- Measure and interpret coverage
- Run unit tests as part of quality gates
Sources and further reading
- Implementing Code Tests with ABAP Unit (lesson) · SAP Learning
- ABAP cheat sheet: ABAP Unit Tests · SAP Samples on GitHub
- Write an ABAP Unit Test for the RAP Business Object (RAP100 tutorial) · SAP Developers
- Why aren't my tests stable? Test Isolation with the ABAP Unit Framework · SAP SE (user group webinar slides)
- Clean ABAP style guide: Testing · SAP on GitHub
- TEST-SEAM (ABAP Keyword Documentation) · SAP Help Portal
- Understanding the Code Coverage Display in the ABAP Unit Browser · SAP Help Portal
- ABAP and Continuous Integration: The ABAP Test Cockpit and the ABAP Unit Runner · SAP PRESS