You can record tests for SOAP-based, XML, plain text, or
binary services with any client program that uses the HTTP protocol.
To record the test, the recorder intercepts the service calls and
message returns between the client and the service. You can choose
between an HTTP or SOCKS proxy recorder or a low-level socket recorder,
depending on the capabilities of the client program.
Before you begin
The following recorders are available for recording traffic
from an application:
- SOCKS proxy recorder: Use this recorder when no proxy connections
are required.
- HTTP proxy recorder: Use this recorder when a proxy connections
is required to connect to the network or when the client program does
not support SOCKS.
- Socket recorder: Use this recorder for low-level network traffic
when the client does not support proxies. This recorder does not support
SSL authentication or encryption of any kind and is only available
if the IBM® Rational® Performance Tester Extension for
Socket Protocols is installed.
Regardless of the recorder that you use, the client program must
use the HTTP network protocol. For recording Java™ Message Service (JMS) or IBM WebSphere® MQ
tests, see
Recording a service test with the generic service client.
If you are using Secure Sockets Layer
(SSL), the HTTP or SOCKS proxy can cause authentication problems because
the proxy recorder relays traffic between the client and the server.
Depending on the authentication method in place, the client might
require that the proxy recorder authenticate itself as the server
and the server might require that the proxy recorder authenticate
as the client. If the client program requires an authenticated server,
you must either have access to the server certificate keystore and
provide it to the proxy recorder or configure the client to accept
the default certificate from the proxy recorder instead of the certificate
from the actual server.
If you are testing a SOAP-based web
service, ensure that you have access to a valid Web Services Description
Language (WSDL) file. The wizard can import WSDL files from the workspace,
the file system, a remote repository, or from a URL. Ensure that the
WSDL files use the correct syntax for the test environment. The generic
service client might not work with some WSDL files.
If you
are using SOAP security, ensure that you have configured the environment
with the correct libraries and configuration files. See Configuring the environment for SOAP security for more information.
Procedure
To record a service test with a client program:
- In the Performance Test perspective, click the New
Test from Recording toolbar button
or click .
- In the New Test from Recording wizard,
click Create a test from a new recording, select Service
Test, and click Next. If
you are recording sensitive data, you can select a Recording
encryption level.
- On the Select Location page, select
the project and folder to create the test in, type a name for the
test, and click Next. If necessary,
click Create Parent Folder
to create a project or folder
- On the Select Client Application page,
select the type of client program to use. The program type
defines the recorder that can be used. The following client program
types are supported for recording a service test:
- Managed Application: This option starts
a specified program and uses a proxy or socket recorder to record
the traffic.
On the Managed Application Options page,
click Browse to specify the Program
path. If necessary, specify the Working directory,
and type the command line Arguments that the
program requires.
If the program requires user input from a
command-line interface, select Open console for user input.
- Microsoft Internet Explorer or Mozilla Firefox:
This option records traffic that is sent and received with either
web browser.
- Unmanaged Application: This option
enables you to record traffic from one or multiple client programs
that use a proxy. You must manually start the client programs and
the proxy recorder records all traffic that is sent and received through
the specified network port.
- Generic Service Client: This option
uses the generic service client if you do not have access to a dedicated
client for the service calls. See Recording a service test with the generic service client for
using the generic service client to record service tests.
- On the Recorder Settings page, depending
on the type of client program you selected, specify these details:
- If you selected Managed Application,
specify the recording method.
- Select Record traffic with the proxy recorder to
record HTTP or SOCKS traffic through a proxy.
- Select Record traffic with the socket recorder to
record low-level network traffic for applications where a proxy cannot
be used. This recorder does not support SSL authentication or encryption.
Note: When using proxy recording, you can filter out HTTP or
HTTPS requests to a specific endpoints so that any requests to those
endpoints are not recorded. See
Proxy recording preferences
- If you selected Record traffic with the proxy
recorder, specify whether the proxy recorder uses HTTP
or SOCKS. Select HTTP if a connection to proxy
is required or if your application does not support SOCKS.
- If you are using SSL authentication, specify the authentication
settings for the proxy recorder. During the recording,
the proxy recorder is between the client and the server.
- If you selected to use the HTTP proxy recorder, specify
how to connect to the network. If necessary, specify an HTTP or SOCKS
proxy or point to a proxy auto-configuration (PAC) file. Use
this option if you are connecting to the service through a corporate
proxy or firewall.
- Click Next. If this is the first
time you record a service test and you did not select a web browser
for the client application, read the Privacy Warning, select Accept,
and click Finish to proceed.
- If you selected a proxy recorder with a managed or unmanaged
application, change the network settings of the client program to
use the proxy recorder. The method for changing the network
settings depends on the client program. However, you must be able
to set the following proxy settings in the program:
- SOCKS or HTTP proxy: Specify the protocol that you selected for
the proxy recorder in the wizard.
- Host name: Set to localhost.
- Port: Specify the port number that you selected for the proxy
recorder in the wizard.
To avoid unexpected results, revert to the previous proxy settings
before you stop the recording.
- Use the client program to perform the actions to test. You can use the Recorder Test Annotations toolbar
to add comments, record synchronizations, or take screen captures
during the recording.
- To add a comment to the recorded test, click the Insert comment icon
.
- To add a screen capture to the recorded test, click the Capture screen
icon
. Screen and window captures make your tests easier to read and help you visualize the
recorded test. You can change the settings for screen captures and add a comment to the image.
- To manually add a synchronization point to the recording, click the Insert
synchronization icon
.
- To manually add a transaction folder to the recording, click the Start
Transaction icon
and Stop Transaction
icon to start and stop the transaction.
- To insert a split point into the recorded test, click the Split point
icon
. With split points, you can generate multiple tests from a single recording, which you can
replay in a different order with a schedule.
- After you finish the user tasks in the client program, stop the recorder. You can do this by
closing the client program or by clicking the button Stop
in the Recorder
Control view. If you changed the network settings of the client program as described in step 8, you can
revert to the default settings before closing the program. The Generate Service Test wizard opens.
- If you inserted a split point during the recording, on
the Destination page, specify the location for
the split test or merge the split recordings together. See Splitting an HTTP test during recording for more information about splitting tests.
- On the Service Test Generation Options page,
if you are testing a SOAP-based web service, specify a Web Services
Description Language (WSDL) file from the workspace or click Add to
import a WSDL or to link to a remote WSDL file.
- Click Finish.
Results
A progress window opens while the test is generated. On completion,
the
Recorder Control view displays the
Test
generation completed message, the test navigator lists
your test, and the test opens in the test editor.