Recording JMS by using the Client Agent

If you are testing a Java application that uses the Java Message Service (JMS) interface, you can use HCL OneTest API to record the transport.

Procedure

  1. Prepare the JMS application
    1. Install and configure the Java virtualization agent and install the agent into the Java application. For more information, see Installing a Java virtualization agent into a Java application.
  2. Prepare HCL OneTest API
    1. In Library Manager, ensure that the Java client libraries from the JMS provider are configured correctly. By completing these steps HCL OneTest API can communicate with a physical JMS server.
    2. In the Architecture School perspective, open the Logical view and then create a JMS topic, queue or destination domain, as appropriate. Optionally, filter queues or topics by specifying a queue or topic prefix on the Recording Studio tab of the JMS Domain.
    3. In the Physical View of the Architecture School, create a physical JMS Broker.
    4. Bind the logical and physical resources in a new or current environment. For more information, see Creating a Java Message Service (JMS) broker.
    5. While you are still in the Physical View, configure the JMS transport. For more information, see Recording and stubbing settings. For the recording mode, select Client Agent.
    6. Import schemas so that HCL OneTest API can apply them to the recorded messages. For information on adding schema for JMS Java object messages, see Adding Java object schemas. A schema is not required for a JMS Map message, as it has a known format.
  3. Record the application
    1. In HCL OneTest API, open the Recording Studio perspective.
    2. Create a recording monitor for the logical JMS domain.
    3. Start a recording session: from the toolbar of the Events View window, click the Start Recording (Start Recording) icon.
      A JMS recording rule is registered with HCL Quality Server.
    4. Check the recording rules and their content: on the Network Dashboard of HCL Quality Server, expand the recording rule you want to view the details of and click the Details tab.

    5. While you are still on the Network Dashboard, verify that the recording has started by clicking the Activities tab to view the log details of the recording activities for the rule.

    6. Wait for recorded events. Depending on the Java application that you are testing, you might have to use the application to generate events.
    7. Stop the recording session: from the toolbar of the Events View window, click the Pause recording (Pause recording) icon.

Results

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