Creating logical Java application resources

A logical Java application resource models the Java application or API to be intercepted and recorded. A subset of the application can also be intercepted and recorded. You can create a logical representation of a Java application.

About this task

A logical Java application resource enables you to specify recording filters that are used when the resource is recorded, so you can record only Java method calls that interest you. You can also specify certain limiting factors, such as maximum messages for each method and maximum argument size. A logical Java application resource models the Java application or API to intercept and record. You can specify recording filters that are used when the resource is recorded.

Procedure

  1. Open the Logical View of the Architecture School perspective.
  2. On the toolbar of the Logical View click General > Java Application. The New Java Application window is displayed.
  3. In the Name field, enter a name for the new logical Java application resource.
  4. Click OK. HCL OneTest API creates the specified logical Java application resource in your project.
  5. Double-click the logical Java application resource. The Java Application window is displayed.
  6. Click the Bindings tab to bind the logical Java application resource to a specific environment or to a specific physical JVM resource.
    Note: If you want to create a new environment, close the Java Application window and click Project > Create New Environment on the menu bar.
  7. Click the Recording Studio tab to specify recording filters.

    By default, a logical Java application resource records everything, which is denoted by a single asterisk (*). If everything is recorded, too much traffic can be generated unless you are intercepting and recording a small Java application. Several standard exclusions are included because they are not usually needed.

    You can modify or remove the standard exclusions. To include methods when recording, you can use an asterisk as a wildcard. To exclude methods when recording, you can use a minus sign (-). You can elect to hide invocations under certain conditions.

    The Include invocation target 'this' in header check box enables you to specify whether the headers of recorded messages will contain the object upon which a method invoked.

    The Hide invocations when the data exceeds (kB) check box and the field next to it are important because large messages will affect the performance of HCL OneTest API.

  8. Click OK.

Results

HCL OneTest API creates a specified logical Java application resource in your project.

What to do next

To complete the creation of a Java method transport, you must do the following tasks:
  1. Create a physical Java virtual machine (JVM) resource in your project.
  2. Bind the resource to the logical Java application resource.