Automatic test case creation using SAP PI/PO Robot

Int4 IFTT PI/PO Robot is a functionality thanks to which test case creation process is much faster than before. There is no need to manually search for PI/PO messages for a specified interface. SAP PI/PO Robot can create test cases based on information from Message Overview Servlet.

Prerequisites:
Before using Robot for the first time, please ensure that all needed settings have been configured as described in Setting up Int4 IFTT PI/PO 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.

Tcode for Robot is /INT4/IFTT_PI_ROBOT.

Steps:

  1. In Environment Selection, please select the environment from which you want to create test cases:

  2. 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 ICOs from SAP PI/PO, click on Import from PI/PO button. 


    Enter additional criteria, like Sender Party or Interface name, and execute. You can also select the checkbox Classical ABAP configuration to search for ABAP interfaces. SAP PI/PO Robot will search for suitable ICOs or (Receiver Determination objects for SAP PO ABAP stack) and list them in the output:


    Select required rows and transfer entries to Robot by Transfer selected button. You may import SAP PI/PO interfaces multiple times. The results will be appended to the current robot configuration list.



    As a next step, we need to specify an automation object for imported entries. We can do it either manually or automatically by click on the button Propose Automation Objects. This function will look for existing automation objects for particular service Interfaces and their namespaces. Result:


    Here, Robot found an existing automation object, AOBJ-2, which meets the criteria. NOTE: For synchronous PI interfaces, you will need to manually change the interface name and interface namespace. Extended configuration fetches a receiver interface while for synchronous scenario sender interface is required. Please refer to the section Creating the configuration object for the PI synchronous interface 

  3. Please notice that if there is more than one automation object in the Int4 IFTT database for Interface & Namespace, the system will propose only the first one. If the proposal is not correct, please change it according to your needs.

    Suppose the system doesn't find an existing automation object for selected Interface & Namespace. In that case, you can automatically create them by clicking on the Generate Object IDs button.
    The system will propose the automation object names for interfaces that are not configured yet in Int4 IFTT:

     (a new IF was imported from PO, and the automation object was missing)
    You can keep names proposed by IFTT or overwrite them with your names, for example, based on WRICEF Numbers.

  4. You may set a folder in which test cases should be created:



    In a column Test Case Folder (1), 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 (refer to point 7).

    You can also specify a subfolder name - Level 1 Subfolder Name (2). 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 (1) or, if you won't specify the main folder, under the folder entered in the main screen (please refer to point 7).
    The last point here is a column ABAP Intf

    • Suppose you imported settings using the Import from PI/PO button and Classical ABAP configuration. In that case, this column will be filled automatically. If you don't use the import function, you should put 'X' in a column for ABAP interfaces.

      Save the configuration and go back to the main Robot screen.


  5. Next, you should specify a period for which Robot should search messages on PI/PO. You can choose Selection with PI/PO Monitoring Message Overview periods or customize it by yourself using Custom Time Range Selection:



    In the example, the robot will search for messages in the last 12 hours.
    You can also restrict the search by adding additional criteria in Sender party / Sender name / Receiver party and Receiver name. However, it's not obligatory.
    Alternatively, you can use Custom Time Range Selection, where the date period is without restrictions. In that case, please take into consideration that without using the SAP PI/PO Message Overview periods, the robot performance is slower.

  6. Specify the maximum number of messages per one search call - the default number is 50.

  7. You can also use an option to add a delay after some number of calls:


    These parameters intend to limit the load of the production SAP PI/PO system. Int4 IFTT Robot intensively calls different SAP PI/PO API services, which may impact performance. You can specify the delay of N seconds between a given number of API calls.

  8. 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.

  9. 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 could select a checkbox to force the creation of an automation object during execution (checkbox Create Automation Objects if ID from Extended Configuration is missing).

  10. 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. In our example, we want to create folders for each Receiver separately so that pattern will look like this:


    For more information about possible Search Patterns, please open the F1 help.

  11. Enter additional data:

    • 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 PI/PO, 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 Asynchronous / Synchronous Test Cases - in our case, it will be 20 (PI Unit Test) and 3 (PI E2E Synchronous).

    And at the end, fill in the Name Pattern for test cases created by Robot (you can also use the F1 help for more information). 

  12. After you specify all the criteria, execute the report.
    Output:


    SAP PI/PO Robot automatically fetched messages from PI/PO and created a folder with test cases based on criteria from the selection screen. You can find a summary at the end of the list:


  13. When you open Int4 IFTT Cockpit (tcode /INT4/IFTT_COCKPIT), you should find test cases in the specified folder with subfolders for each Receiver, like here:


By the dynamic folder searching (using search pattern), the Robot will repeatedly run (because, for example, there were no messages on that day). It will be updating the test case list in each folder during every run.

© 2017 - 2022 Int4 AG All rights reserved