Use the HTTP proxy in the IBM® Rational® Test Control Panel to
record all HTTP and HTTPS traffic that is routed through the proxy.
Before you begin
- 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 Rational Test Control Panel can
route and proxy HTTP, HTTPS, and TCP traffic. For information about
deploying the HTTP proxy, see HTTP/TCP proxy setup.
- If you are using an external HTTP proxy, install the HTTP proxy
and configure it to record HTTP and HTTPS traffic.
- In Rational Test Control Panel,
ensure that the proxy is shown for the correct domains in Rational Test Control Panel.
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 Rational Test Control Panel 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.
- 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
IBM Rational Test Virtualization Server,
the HTTP proxy can also be used to route HTTP and HTTPS traffic to
Rational Test Virtualization
Server stubs
automatically when they start instead of routing traffic to the live
system. For information about using
Rational Test Virtualization
Server,
see
Virtualization testing using Rational Test Virtualization Server.
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 where a Rational Integration Tester HTTP
proxy in recording mode is acting as an intermediary that enables
HTTP messages to appear in the Recording Studio perspective while
also passing messages back and forth between the original client and
server applications.
The port numbers that are
specified in the diagram are default port numbers.
Procedure
To use Rational Integration Tester to
record HTTP or HTTPS traffic:
- If you are using an external HTTP proxy, configure the
system under test so that it sends its HTTP(S) traffic through the
proxy. For instructions that cover various applications,
see HTTP/TCP proxy setup.
- Create a logical HTTP connection. For information, see Creating logical HTTP connections. In some cases, Rational Integration Tester creates
a physical web server resource automatically when you create the logical
resource.
- If necessary, create a physical web server resource, as
described in Creating physical web server resources. On the Recording page, set the Recording
Mode field to External Proxy Server (the
default) or Packet Capture.
- 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. For
information about the various ways to create operations, see Options for creating test resources.
For information about monitoring operations or transports, see Monitoring operations or transports.
- In the Monitor Configuration window,
select the monitor for the HTTP transport or a related operation.
- By default, the monitor records traffic only for the host
that is specified in the web server transport settings. To record
traffic for all hosts, set Host Filter to Off in
the Event Monitor Properties panel.
- Click the Start Recording icon to start recording.
Results
You are now recording HTTP and HTTPS traffic.
What to do next
- After you have recorded events, Recording Studio attempts to determine the schema to apply to
the message. To change this schema, see Events view. To extract
parameters from the URL, use a REST schema, as described in Creating a REST schema.
- After you finish recording, you can highlight one or more individual events. Click
Save Events to create resources such as tests, stubs, and test data sets. For
more information, see Creating an operation from recorded events, Creating tests from recorded events, and the Stub creation by using the Recording Studio for
creating stubs.