ABAP Test Isolation Examples

October 4, 2023 ยท View on GitHub

REUSE status

This repository contains examples for all currently available test isolation tools in the ABAP Platform.

The Idea

The idea of this repository is to show how to use any test environment, helper class and some common design patterns that help with isolating your code under test from its depended-on components.

How To Use This Repository

If you want to isolate your code under test from the components it uses, you need to take a look at what your depended-on component is. Each isolation technique for a specific kind of depended-on component is used separate test class of the global class ZATI_CL_CODE_UNDER_TEST. The table below shows which test class uses which tool to isolate against which kind of depended-on component.

Test ClassDepended-On ComponentToolFirst Release
ltc_call_other_objectClassesSelf-made test doublesWith ABAP OO
ltc_call_other_object_fwClassesABAP Object Oriented Test Double FrameworkSAP BASIS 740 SP9
ltc_call_function_moduleFunction ModulesFunction Module Test Double FrameworkSAP NetWeaver 756
ltc_select_database_tableDatabase Tables and CDS EntitiesABAP SQL Test Double FrameworkSAP NetWeaver 752
ltc_select_cds_entityDatabase Artefacts which are used in CDSABAP CDS Test Double FrameworkSAP NetWeaver 751
ltc_call_authority_checkAuthority ChecksClassic ABAP Authority Check Test Helper APISAP NetWeaver 755
ltcl_call_rap_bo_tx_bf_dblRAP Business ObjectsTransactional Buffer Double SupportSAP NetWeaver 757
ltcl_call_rap_bo_mock_eml_apiRAP Business ObjectsMock EML API SupportSAP NetWeaver 757

Requirements

You need a system with an ABAP runtime and abapGit.

Download and Installation

You can pull the code with abapGit to any system with an ABAP runtime.

How to obtain support

Create an issue in this repository if you find a bug or have questions about the content.

For additional support, ask a question in SAP Community.

Code of Conduct

If you want to contribute to this repository, please check our Code of Conduct.

Contributing

Please feel free to check our Contribution-Guide.

License

Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.