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.

If you have recorded a test that does not use SSL, you can convert that test to be secure by adding an SSL object to the corresponding Server Access Configuration in the test. Test editor
To record an application that requires a client-side certificate, import the client certificate to the Rational® Performance Tester project. To import the certificate, click File > Import > General > File System, and navigate to the folder that contains the certificates and click Finish.File System dialog

About this task

The following recorders are available for recording HTTP traffic from a browser:
  • 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

  1. In the Performance Test perspective, on the toolbar, click the New Test From Recording icon New Test From Recording toolbar button or click File > New > Test From Recording.
  2. 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.
  3. 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 Create the parent folder icon to create a performance test project or folder.
  4. 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.
  5. 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:
    1. If you selected a browser, specify the recording method:
      • To record HTTP or SOCKS traffic through a proxy, click Record traffic with the proxy recorder. To record low-level network traffic for applications where a proxy cannot be used, click Record traffic with the socket recorder. Use this option when you are not using Mozilla Firefox or Microsoft Internet Explorer.
        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 IBM® Rational® Functional Tester is installed and shell-shared with Rational® Performance Tester, for the Web UI tests, you can use the Record user actions option to record the functional aspects of the application in the same HTTP recording session. Thus, both the functional and performance aspects of the application are recorded.
      • If the server requires client SSL authentication, provide the client certificate for the proxy recorder to be authenticated by the server as though the proxy recorder were the client. Select The server requires a specific client certificate.

        To provide single certificate keystore, specify the file name and password of the server certificate keystore. If multiple certificates are required, click Multiple certificates, and click Add to specify a certificate keystore file name and password for each host name and port.

        To provide smart card authentication, specify the certificate alias and PIN code of the smart card. See the topic for more information.
        Note: You must ensure that the smart card reader device is connected to the machine that has Rational® Performance Tester and you have inserted the smart card into the reader.
      • To record a secured site using Internet Explorer or Google Chrome on Windows, install the recorder certificate by selecting Register the recorder root certificate authority. Before the recording starts, the browser prompts you to install the certificate. After the recording is stopped, the browser prompts you to uninstall the certificate. To avoid multiple prompts for each recording, select Keep the recorder root certificate authority after recording.
        Note: If you already had the certificate from a version prior to 9.2.1 and then install the latest version of the product, you might have to install the certificate again.
        This option is not available when you record by using the Firefox or Safari browser. To record a secured site on these browsers, manually import the certificate in the browser from the default location C:\Program Files\IBM\IBMIMShared\plugins\com.ibm.rational.test.lt.recorder.proxy_version\SSLCertificate. For information about how to import the certificates, see the browser's documentation.
      • If you selected Mozilla Firefox, you can choose to use a temporary Firefox profile. This option starts the Firefox browser without any bookmarks, plug-ins, or tool bars that might be associated with your usual profile. Select Use an alternate Firefox profile, and then select Use a temporary Firefox profile.
      • If you clicked Record traffic with the proxy recorder, click Advanced to specify whether to use an HTTP or SOCKS proxy recorder to review and edit network connection settings that the browser uses or to specify advanced SSL authentication settings. If you clicked Record traffic with the socket recorder, specify the advanced SSL authentication settings.
    2. If you selected Managed Application, complete the following steps:
      1. On the Recording Method page, click a recorder to record HTTP traffic and click Next.
      2. On the Managed Application Options page, for Program path, click Browse to select the program. If necessary, specify the Working directory, and in the Arguments field, type the command-line arguments that the program requires. Click Next.
      3. If the program requires user input from a command-line interface, select the Open console for user input check box. Click Next.
      4. Depending on the recording method that you selected, complete one of the following steps:
        • On the Proxy Recorder Settings page, specify whether to use an HTTP or SOCKS proxy recorder to review and edit network connection settings that the browser uses or to specify the advanced SSL authentication settings.
        • On the Socket I/O Recorder Secured Settings page, specify the advanced SSL authentication settings.
    3. If you selected Unmanaged Application, on the Proxy Recorder Settings page, specify whether to use an HTTP or SOCKS proxy recorder to review and edit network connection settings that the browser uses or to specify the advanced SSL authentication settings.
      To record an HTTP test from a mobile device, see Recording an HTTP test for mobile applications.
  6. Click Finish.
    A progress window opens while your browser starts.
  7. 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.
  8. 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 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 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 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 Insert synchronization icon.
    • To manually add a transaction folder to the recording, click the Start Transaction icon Start Transaction icon and Stop Transaction icons Stop Transaction icon to start and stop the transaction. Transactions can be nested.
    • To insert a split point into the recorded test, click the Split point icon 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 Filter packets icon 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
      You can add and remove packet filters as needed.
  9. 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 Stop icon in the Recording Control view.
  10. 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 Window > Preferences > Test > Test Generation > HTTP Test Generation, and, for Service tests, click Service Test Generation and then click the Enable domain review before test generation check box.

Results

A progress window is displayed while the test is generated. After the test is complete, the Recording Control view displays the Test generation completed message, the test navigator lists your test, and the test opens in the test editor.