Recording HTTP and HTTPS traffic

Use the HTTP proxy in the HCL® Quality Server to record all HTTP and HTTPS traffic that is routed through the proxy.

Before you begin

  1. Decide whether to record by using an external HTTP proxy or by using the packet capture method.
    • Although packet capture is simpler than using an external proxy server, the method involves a number of limitations. See Limitations of packet capture.
    • The HTTP proxy in the HCL® Quality Server can route and proxy HTTP, HTTPS, and TCP traffic. For information about deploying the HTTP proxy, see HTTP/TCP proxy setup.
  2. If you are using an external HTTP proxy, install the HTTP proxy and configure it to record HTTP and HTTPS traffic.
  3. In HCL® Quality Server, ensure that the proxy is shown for the correct domains in the server. If the proxy does not appear with the correct domain, review the configuration information in the registration.xml file for the proxy. In particular, the URL of the server should be correct, and the domain and environment elements should correctly reflect the domains and environments where the proxy is to be registered. For more information, see Modifying the configuration settings of the HTTP/TCP proxy.
  4. If you must differentiate between multiple web services over a single URL, set up a filter for each service. See Filtering header values.
If you are using HCL OneTest Virtualization, the HTTP proxy can also be used to route HTTP and HTTPS traffic to HCL OneTest Virtualization stubs automatically when they start instead of routing traffic to the live system. For information about using HCL OneTest Virtualization, see HCL OneTest Virtualization overview.

If your system under test has an HTTP connection, several methods are available to create the logical HTTP connection, physical web server resource, and other test resources. For more information, see Options for creating test resources.

About this task

The following diagram shows an example network configuration. In it, the HCL OneTest API HTTP proxy, in recording mode, is acting as an intermediary that enables HTTP messages to appear in the Recording Studio perspective. The proxy is also passing messages back and forth between the original client and server applications.

Example network configuration with HTTP proxy in recording mode acting as an intermediaryThe port numbers that are specified in the diagram are default port numbers.
Note: The recording of HTTP or HTTPS traffic is not supported for WebSockets. While HTTP traffic is allowed through non-secure WebSockets, the HTTPS traffic is not allowed through non-secure WebSockets. Both HTTP and HTTPS traffic are not allowed to pass-through secure WebSockets.

Procedure

To use HCL OneTest API to record HTTP or HTTPS traffic:

  1. Configure the system under test if you are using an external HTTP proxy so that it sends its HTTP(S) traffic through the proxy.
  2. Create a logical HTTP connection.
    In some cases, HCL OneTest API creates a physical web server resource automatically when you create the logical resource.
  3. If necessary, create a physical web server resource.
    On the Recording page, set the Recording Mode field to External Proxy Server (the default) or Packet Capture.
  4. In Recording Studio, create an event monitor. The most common method is to monitor an operation that uses HTTP, although you can also monitor the logical HTTP transport itself.
  5. In the Monitor Configuration window, select the monitor for the HTTP transport or a related operation.
  6. Optional: Change the Host Filter settings.
    Note: The monitor records traffic only for the host that is specified in the web server transport settings, which is the default behavior and the Host Filter is set to On in the Event Monitor Properties panel. If the Host Filter is set to Off, the monitor records traffic for all hosts.
  7. Click the Start Recording icon to start recording.

Results

You are now recording HTTP and HTTPS traffic.

What to do next