Introduction

This article describes how to test an API in SAP API Management.

Example case

We will test the scenario where Sales Order is posted by the message sent in SalesOrderERPCreateRequestConfirmation_In_V1 API. The end-to-end process will be tested and validated, starting on the API Management setup and Backend interface layer where Sales Order is posted.

The request message with Purchase Order details is sent that posts Sales Order in the Backend. Then the response message is sent from the backend system with confirmation.

Int4 IFTT will validate the SAP API Management part. At the same time, it will validate created test sales order, comparing it to the reference one posted with a reference message saved as a test case.

Procedure

Int4 IFTT Automation Object

Int4 IFTT Automation Object was created to test the example API. You can find more details on creating Automation Objects here:: Creating the configuration object for SAP API Management


Two variables are created for this automation object:

In the additional parameters, the following parameters are added.

Test Cases Creation

Test Cases have been created manually and automatically via Robot.

You can find more details on creating test cases here: SAP API Management Automatic test case creation for SAP API Management

Test Cases Execution

After test cases execution, the Test Results Report shows the overall status.

In the execution details, we can see the endpoint URL and the reference and current values for Purchase and Sales Orders.

As response messages are also part of the test case, Int4 IFTT validates whether the response is the same.

We can see that nodes: Note and ID are marked as payload validation ignore lists. It is because it is expected that reference and test response values will differ.

In the last step, reference and tested sales orders are compared.