Recording an HTTP test
To test the performance of an application, you must first record the HTTP traffic that traverses between the client and the server. You record the HTTP traffic of the application by initiating the recording from the product. When you record the test, a proxy recorder intercepts the HTTP traffic between the browser and the web server.
Before you begin
Certain websites require appropriate certificates to use a proxy recorder to record the site. The recorder certificate is required to record all the secured sites. The client certificate is different and it serves as an additional layer of security that is required by the web server to authenticate the client/browser. If some applications use Secure Sockets Layer (SSL), the proxy recorder can cause authentication problems because SSL relays traffic between the client and the server. Depending on the authentication method in place, the client might require the proxy recorder to authenticate itself as the server, and the server might require the proxy recorder to 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.
![Test editor](../images/SSL_test.png)
![File System dialog](../images/import_cert.png)
About this task
- SOCKS proxy recorder: Use this recorder when no proxy connections are required.
- HTTP proxy recorder: Use this recorder when proxy connections are 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.
You can record and generate a test by using REST APIs. The API documentation to record a test is located at Install_directory\IBM\IBMIMShared\plugins\com.ibm.rational.test.lt.server.recorder.jar. The API documentation to generate a test after the recording completes is located at C:\Program Files\IBM\IBMIMShared\plugins\com.ibm.rational.test.lt.server.testgen.jar.
Procedure
-
In the Performance Test perspective, on the toolbar, click the New Test From
Recording icon
or click .
- In the New Test From Recording wizard,
click Create a test from a new recording, select HTTP
Test, and click Next.If you are recording sensitive data, click Recording encryption level and select the encryption level to record.
- 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 the Create the parent folder icon
to create a performance test project or folder.
- On the Select Client Application page,
select the web browser to use.The type of application defines the recorder that can be used. The following client application types are supported for recording a service test:
- Microsoft Internet Explorer: This option records traffic that is sent and received with Internet Explorer.
- Mozilla Firefox: This option records traffic that is sent and received with Firefox.
- Google Chrome: This option records traffic that is sent and received with Chrome.
- Apple Safari: This option records traffic that is sent and received with Safari.
- Opera: This option records traffic that is sent and received with Opera.
- Managed Application: This option starts a browser that is not on the list.
- Microsoft Edge: This option records traffic that is sent and received with Edge.
- Unmanaged Application: This option records HTTP 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.
-
Depending on your selection in Step 4, perform one of the following steps: On the
Recorder Settings page, depending on the browser that you selected,
specify the following details:
-
Click Finish.
A progress window opens while your browser starts.
-
In the browser address field, type the address of the web application to test, and activate the
link.
Note: If you enter the address of a secure website (one that starts with https:), your browser might display a security alert. Depending on the security certificate for the site, you might be required to accept a security risk to proceed with the recording.
-
Complete the user tasks to test. While you are recording, adhere to the following
guidelines:
- Wait for each page to load completely. This wait does not affect performance results, because you can remove extra waiting time (think time) when you play back the test.
- Do not change any browser preferences.
You can use the Recorder Test Annotations toolbar to add comments, record synchronizations, or take screen captures during the recording.- To change the page name, click the Change page name icon
. In the resulting test, the page element in the test editor uses the new name; however, the original name is preserved in the Page Title Verification Point area so that page title verification points still work correctly.
- To add a comment to the recorded test, click the Insert comment icon
. Add a comment when you get a prompt.
- To add a screen capture to the recorded test, click the Capture screen
icon
. The 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 icons
to start and stop the transaction. Transactions can be nested.
- 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. See Splitting an HTTP test during recording for more information about splitting a test.
- To filter packets that display during recording sessions, click the Filter
packets
icon. You can specify the filter criteria for the following elements:
- SAP packet type
- SAP packet attribute
- Socket packet type
- Socket packet attribute
- Packet type
- Proxy connection IDs
- Citrix events
- A group of conditions
- Remote host
-
After you finish the user tasks in the browser, stop the recorder. You can stop the browser by
closing the client program or by clicking the Stop icon
in the Recording Control view.
-
Select the domains to include in the test and click Finish. The domains
that are not selected are not included in the test. You can add them back by generating the test
again from the recording.
To include all the domains for all of the recordings, click the Select all and remember my decision check box. To enable the filter again for HTTP tests, click , and, for Service tests, click Service Test Generation and then click the Enable domain review before test generation check box.