Michal Krawczyk, SAP Integration Architect and co-founder at Int4, API testing evangelist with Int4 IFTT
When SAP S/4HANA conversion projects took off companies started asking themselves questions about the possibility of doing any kind of automated testing. The traditional approach including User Interface (UI) testing for End to End (E2E) processes does not work when User Interfaces are getting changed from SAPGUI to Fiori applications. Is there any place which does not change for all 3 types of migrations (described in “Demystifying the ‘Selective Data Transition’ Migration Approach to SAP S/4HANA”): fresh implementations (Greenfield approach), system conversions (Brownfield approach) or selective data transition (also called Bluefield ™ approach)? Let me try to give a small hint: will the B2B partners, legacy applications and other integrated systems expect a different set of fields in messages (i.e. IDOCs, Proxy messages, etc.) exchanged with the S/4HANA system that they did with the old ECC system? The answer seems straightforward – the interfaces need to remain exactly the same irrespectively of the version and type of the SAP ERP system. This means SAP Application interfaces are perfect candidates for automated testing in S/4HANA conversion projects.
What Are SAP Application Interfaces (Also Called APIs)?
SAP systems communicate with other systems (other SAP systems, non-SAP legacy applications and B2B partners – like EDI) using a variety of technologies however the majority of those include IDOC and ABAP proxy messages. In many cases SAP systems would also use some kind of middleware technology like SAP Process Orchestration or SAP Cloud Platform Integration or some kind of non-SAP middleware. What is important is that majority of SAP application interfaces are both asynchronous (one-way communication) and persistent (messages are stored in the database) which opens up a new level of possibilities with respect to testing which will be described further in the article.
What Are the Challenges For Testing SAP Application Interfaces for SAP S/4HANA Conversion Projects?
Why is SAP application interface difficult during the S/4HANA projects? It seems there are two main reasons for that, lack of SAP API testing knowledge and lack of knowledge about SAP API testing tools. As opposite to the general knowledge about the User Interface (UI) testing, SAP Application Interface (SAP API) testing is not very well known, where in fact due to the asynchronous nature of most SAP Application Interfaces it’s amazingly easy to test them just by repeating existing messages (more on the in the next chapter). When it comes to SAP Application Interface (SAP API) testing tools SAP provides a few of them but their usage on SAP projects is fairly limited. In order to help with both of those challenges the author of the article with two other co-authors prepared an SAP PRESS book on this topic, Testing SAP APIs: Strategy and Execution, where you can learn in more details on how to approach the SAP API testing with examples from S/4HANA conversion projects.
One of the typical worries during the S/4HANA projects is do we need to use legacy applications, B2B (EDI) partners or even our own middleware for testing the S/4HANA conversion. It’s a very good question and the answer to that is – yes…but only if you want to make sure the project will take much longer than required and testing will be much more difficult. As mentioned in the introduction for this article, it’s only the SAP ERP systems that is getting changed, so why wouldn’t you want to decouple testing it from testing the other applications which are not getting changed? Once you do it for the first time the value of decoupling the dependencies (other systems) will become so apparent during the first runs of the regression testing that you will immediately see the enormous potential in this kind of approach.
Virtualization Is the Key
In order to decouple S/4HANA system from other systems which communicate with it we need to virtualize those external applications. This way any kind of S/4HANA system used for testing during the S/4HANA project will be able to run complete business processes without interacting with any 3rd party system and if we want we can even virtualize the middleware which is often used for connecting S/4HANA system with the outside world. This would give the test team complete freedom in running the isolated tests and will make sure the vital SAP application interfaces will also be fully tested.
Why Is That So Easy and Quick?
How can we regression test the SAP Application interfaces during the S/4HANA conversion? Since the messages are persistent the only thing, we need to do is to rerun the existing messages (for example IDOCs) which were posted before the conversion right after the conversion. As most of the companies are doing a copy of production landscape and do the test conversion on such a system, this is the ideal place to rerun both the inbound and outbound messages after the conversion is done and automatically compare the results with the data posted before the conversion as shown in Figure 1.
Figure 1 – Repeating messages for SAP S/4HANA conversion
It terms of speed we’re talking about being able to compare hundreds of messages and related business documents in minutes just by selecting the IDOCs numbers which we want to reprocess so the approach is also completely scriptless (we don’t need to create any test data as it already exists).
Learn more on the SAP Application Interface testing and Virtualization by doing a free openSAP course: Virtualize and Automate Your SAP Testing Using Int4 IFTT (https://open.sap.com/courses/iftt1-pc)
How Can We Do That?
SAP in standard offers a few tools which can be used for testing SAP Application Interface scenarios like SAP Process Integration Test Tool (SAP PIT) which can help to virtualize systems communicating with the SAP Process Orchestration or SAP Solution Manager Test Suite which can be used to repeat the existing business documents with the use of eCATT scripts or CBTA technologies. There are also 3rd party enterprise software solutions designed for complete and native SAP Application Interface testing and virtualization like Int4 IFTT which are designed just for this purpose, but you can also use a mix of several tools.
In the End
The aim of this article is to work on the first challenge with SAP Application Interface testing for S/4HANA conversions – show that this type of testing is not only possible but also easy to set up and very quick in execution but as the technologies for supporting SAP API testing are relatively new they may require some new skills.
I will speak at length on this topic during my presentation at SAPinsider’s upcoming virtual summit, Your Move to SAP S/4HANA, happening October 14-15. Join me!