Recording and virtualizing RFCs

You can record and virtualize SAP application resources. If you are testing a Java application that uses the SAP Java Connector (JCo) to make remote function calls (RFCs) to an SAP application server, use Test Integrations and APIs to record and virtualize those calls.

Before you begin

Software requirements:
  • A Java 6.0 or later application
  • SAP Java Connector 3.x
  • Test Integrations and APIs
  • HCL DevOps Test Virtualization Control Panel (Test Virtualization Control Panel)
  • Java virtualization agent that is provided with Test Virtualization Control Panel.
Note: Test Integrations and APIs supports virtualizing the RFC and BAPI services only and not the whole SAP application stack. Therefore, whenever service virtualization is used for RFC/BAPI transactions, a permanent connection is required between the client application and the SAP system.
Complete the following tasks:
  1. In Library Manager, ensure that the SAP Java Connector library is configured correctly. Completing this task enables Test Integrations and APIs to communicate with a physical SAP application server and synchronize schemas.
  2. In Test Integrations and APIs, create the required physical SAP application server transport and logical SAP application server in your project and import schemas from the physical SAP application server. Completing this task enables Test Integrations and APIs to apply schemas to all recorded messages.
    Note: When creating the logical SAP application server, you can use the Function filter field in the RFCs tab in the SAP System window to filter the RFCs that you want to record.
  3. Ensure that your Test Integrations and APIs project is connected to a valid instance of Test Virtualization Control Panel. Completing this task enables Test Integrations and APIs to issue commands to the Java virtualization agent.
    Note: To ensure that the connection is working correctly, click Project > Project Settings on the menu bar, click the Server Settings tab on the Project Settings window, and verify that a green checkmark icon is displayed next to the URL field on the Control Panel area of the tab. If there is no URL displayed or if there is a red cross icon next to the URL field, contact your Test Integrations and APIs project administrator.
  4. Ensure that a domain is selected on the Server Settings tab on the Project Settings window. If there are no domains, a domain must be created by a Test Virtualization Control Panel administrator. Recording occurs within a domain and the Java virtualization agent can be registered with all domains or a single domain in the Test Virtualization Control Panel instance that you are using. Therefore, selecting a domain in Test Integrations and APIs enables the application to record or virtualize RFCs.
    Note: If the domain-level security is enabled, you can connect only to domains to which you have been granted access.
  5. Install and configure the Java virtualization agent and install the agent into the Java application. Completing this task enables Test Integrations and APIs to record or virtualize RFCs.

About this task

You can create tests and stubs from any recorded events captured in the Recording Studio perspective and from any operations captured in the Logical View of the Architecture School perspective.

Procedure

  1. In Test Integrations and APIs, open the Recording Studio perspective.
  2. Create a recording monitor for the logical SAP application server.
  3. Start a recording session by clicking Start Recording (Start Recording) on the toolbar of the Events View window.
  4. In Test Virtualization Control Panel, open the Infrastructure Dashboard, expand the agent card and from the Activities tab verify that recording has started.
  5. Wait for recorded events.
    Note: Depending on the Java application that you are testing, you might have to use the application to generate recorded events.
  6. Stop the recording session by clicking Pause recording (Pause recording) on the toolbar of the Events View window.

Results

In Recording Studio, you can use the Recorded Events wizard to save the recorded events as a test, stub, or other project resource.