Automatic test case creation using SAP CPI Robot
The Int4 IFTT CPI Robot is a functionality that comes to simplify and speeds up the mass test case creation process. With the Robot, you have the option to create test cases even for all the iFlows at once. Please note that you need to have configured at least one environment for SAP CPI. Otherwise, you will not be able to select an environment for the Robot configuration or execution.
Tcode for the SAP CPI Robot is /INT4/IFTT_CPI_ROBOT.
You can also access the Robot through Int4 IFTT Cockpit under Goto Menu → SAP CPI Test Case Creation Robot.
Please note that test cases downloaded from Production landscape might contain sensitive data. This data is stored in IFTT tables and might be sent to other systems during test case execution.
Sensitive data can be scrambled by appropriate rules in the automation objects.
Steps:
In Environment Selection, please select the environment from which you want to create test cases:
Please also note that CPI Trace must be active during message processing to store the message payloads. That's why you need to activate the traces before Robot Execution. Just click the button Activate CPI Trace to go to the Int4 IFTT CPI Trace Scheduler.
In the next section, called Message Selection Criteria, you can specify all the needed criteria which the Robot should consider during message selection.
Please note that first, you must complete the configuration under Open Extended Configuration:
In the beginning, the list will be empty. To import iFlows from SAP CPI, click on Import from CPI button.
Then you need to select the Landscape from which the iFlows should be fetched. The list will be filled with all the iFlows from the given Landscape.
Now you have three options to configure the Automation Objects:
Manually - Fill the Automation Object Name
Propose Automation Object - The program will look into the Int4 IFTT Automation Object Database for the iFlow configuration based on the iFlow ID and populate the IFTT Automation Object.
Generate Object IDs - If the system doesn’t find existing automation objects, you can create them automatically by clicking on the Generate Object IDs button.
The system will propose the automation object names for interfaces that are not yet configured in Int4 IFTT.
You can keep names proposed by IFTT or overwrite them with your names, for example, based on WRICEF Numbers.
Lastly, in the Extended Configuration, you may set a folder in which test cases should be created:
In a column Test Case Folder (2), you can enter the main folder where test cases created by Robot should be located. It’s possible to leave this column empty and forward this task to Robot.
You can also specify a subfolder name - Level 1 Subfolder Name (1). In this case, Robot will create test cases in a new folder from this column. It means that this subfolder will be located either as a child of Test Case Folder (2) or - if you won’t specify the main folder here - under the folder entered in the main screen.
Save this configuration, and you can go back to the main screen.
You can filter the Extended Configuration object list providing either IFTT Automation Objects or CPI iFlow IDs.
Specify a Time Range Selection.
Please note that for this time range, the Trace must be activated. Otherwise, no payloads will be found on CPI.
Then you have the Message Search Control Parameters:
These parameters intend to limit the load of the production SAP CPI system. Int4 IFTT Robot intensively calls different SAP CPI API services, which may impact performance. You can specify the delay of N seconds between a given number of API calls.
In the next section, you can specify Execution Parameters:
Test Run - Robot will search for messages and list out the results without creating any test cases
Log Level Debug - you can select this option to obtain log messages during execution.
The last section covers information about Test Case Creation Parameters:
Firstly, specify Target Folder where test cases created by Robot should be located (use the F4 input help if needed).
Suppose you didn't specify Automation Object ID in Extended Configuration, or Robot won't find a given object. In that case, you can select a checkbox to force the creation of an automation object during execution (checkbox Create Automation Objects if ID from Extended Configuration is missing).Define rules about Test Case folders in case folder was not maintained in Extended Configuration.
You can ask Robot to search for an existing folder or create a new one using a search pattern.
For more information about possible Search Patterns, please open the F1 help.Maximum number of test cases per folder (including already existing ones)
Select Skip duplicates in the same folder in case you don't want to have more than one test case with the same MessageID,
Randomize message selection Suppose there is a bigger number of messages in CPI, for example, 200. In that case, you can select this option to pick up messages randomly instead of picking ten messages in a row.
Define Interface Types for Test Cases - in our case, it will be 12 (SAP CPI E2E Inbound).
After you specify all the criteria, execute the report.
Based on the Execution Parameters, you will get a list with additional information.
SAP CPI Robot automatically fetched messages from the SAP CPI and creates the folders if needed with test cases based on criteria from the selection screen. You can find a summary at the end of the list. When you open the Int4 IFTT Cockpit (tcode /INT4/IFTT_COCKPIT), you should find test cases in the specified folder with the additional subfolders.
© 2017 - 2022 Int4 AG All rights reserved