Recording Java method calls

To record Java™ method calls, you use the Java application that you want to record, an instance of the Java virtualization agent as applicable installed into the application, and a Java method transport in HCL OneTest™ API.

Before you begin

  1. Configure the Java virtualization agent that is provided with HCL Quality Server and create a Java method transport in HCL OneTest API.
  2. Install the Java virtualization agent into the Java application that you want to record.
  3. Create and bind a logical Java application resource and a physical Java virtual machine (JVM) resource in the Architecture School perspective of HCL OneTest API.

About this task

Use the HCL OneTest API Java virtualization technologies, Java virtualization agent to intercept and record Java method calls. Doing so is useful when middleware technology is unavailable or too expensive to acquire, or when other HCL OneTest API virtualization capabilities do not support a particular middleware technology.

The HCL OneTest API Java virtualization agent enables you to intercept and record any Java method calls. This may mean that you will intercept and record lots of messages.

When you are recording Java method calls, you might have to discover which parts of a Java application are needed for testing purposes and which parts can be discarded. To discover this information, experiment with the filter settings of the logical Java application resource that you are using to vary the volumes of events and types of methods recorded. If you are not familiar with the Java application that to test, start by removing or limiting the filter settings of the logical Java application resource and recording a large number of events initially. After recording a large number of events, you can analyze them in the Events View of the Recording Studio perspective. During your analysis, you can determine the purpose of each call, which should help you to refine the filter settings of the logical Java application resource.

Procedure

  1. Ensure that the Java application to record is running. Ensure that Java virtualization agent instance is running with the Java application. You can use the Infrastructure Dashboard of HCL Quality Server to monitor the agent. If the agent is not displayed, open the registration.xml file of the agent to verify the HCL Quality Server instance with which it is registered.
  2. In the Recording Studio perspective, create an event monitor for the Java method transport.
  3. Click Record. HCL OneTest API creates a new recording rule. You can use the Infrastructure Dashboard of HCL Quality Server to view the recording rule.
  4. Use the Java application to generate recorded events.
Feedback