Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
MichaelSauter
Advisor
Advisor
Are you tired of long-running, unstable tests? Test Isolation might help with that. In most technology stacks, there is an abundance of frameworks and tools to help with that. But in the ABAP environment, there are fewer open source libraries to help there and it's harder to import them into the systems to use them.

But how can I isolate my unit tests in ABAP, then?

Actually, there are quite a few helpful tools to help there and there are more and more coming.

But finding the existing ones, learning about new ones and being able to use them can still be hard. That's why I created a repository containing examples of all existing test isolation tools which are currently available 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 Class Depended-On Component Tool
ltc_call_other_object Classes Self-made test doubles
ltc_call_other_object_fw Classes ABAP Object Oriented Test Double Framework
ltc_call_function_module Function Modules Function Module Test Double Framework
ltc_select_database_table Database Tables and CDS Entities ABAP SQL Test Double Framework
ltc_select_cds_entity Database Artefacts which are used in CDS ABAP CDS Test Double Framework
ltc_call_authority_check Authority Checks Classic ABAP Authority Check Test Helper API
ltcl_call_rap_bo_tx_bf_dbl RAP Business Objects Transactional Buffer Double Support
ltcl_call_rap_bo_mock_eml_api RAP Business Objects Mock EML API Support

The Future of This Repository


I'll do my best to stay up-to-date with frameworks that come up in the ABAP stack, but you are all invited to contribute to the repository! Share your thoughts, comment on this post if I missed something and let me know what you need there.

If you feel like having a more detailed explanation, a tour through the terminology being used and the repository itself, you can join on September 7th here. If you want to add it to your calendar, here's the download.
11 Comments