Creating the configuration object for SAP API Management
Introduction
The configuration shown below as the example is based on the following API.
Â
PROCEDURE:
Create a new object definition with a description and the name of the tested SAP API.
In Object Variables Settings, define variables names and descriptions.Â
In Variable Processing, define actions and variable processors that will process each of the variable's data.
In Database Comparison Rules define Table Names of those tables that should be compared.Â
In Selection Criteria define how Int4 IFTT should locate those tables, e.g., by a reference to which value.
In Comparison Details define a set of fields to be compared and rules to be applied.
Define Additional Parameters
For API Testing, some additional parameters are required that define what API is tested.ALT_RFC - alternative RFC connection created in SM59 where the message should be sent. In the shown example, RFC API_MGMT is used for this purpose.
This RFC in the Target Host should the link you can find your API Portal under Host Alias.SYNC_URL (3)- direct endpoint to the tested SAP API. This parameter should be the value you can find in your API Portal for the tested API under API Base Path.
Â
HTTPHEADER (2)(4)(5) - Â Values added to the custom header while sending the message. These parameters are optional, and they are dependent on the tested API.
Define Number Ranges that can be used, e.g., to generate values for messages created after the test case execution.Â
For more details about the Int4 IFTT Automation Object definition, visit this page: Object definition - Header of the Automation Object .
Â
HANDLING AUTHORIZATION POLICIES
In case of testing interfaces with specific authorization requirements e.g. protected with OAuth VerifyAccessToken policy it is possible to specify additional authorization request with Additional Parameter AUTH_REQ. This parameter should contain number of test case used for obtaining additional authorization data like access tokens. All variables from this authorization request can be used to populate HTTP headers of interface under test. These variable should be prefixed with ‘AUTH_’.
Example:
Configuration of automation object for OAuth protected interface:
Access token is fetched by test case 31729 which is configured to return the token in ACCESS_TOKEN variable.
Â
© 2017 - 2022 Int4 AG All rights reserved