If you do not can't, or just don't want to, deploy message proxies (the recommended approach; discussed in Recording Traffic from Message Proxies), you can record HTTP, JMS, and MQ traffic "on the fly" with the recording proxy. Like message proxies, these proxies can concurrently capture live HTTP, JMS, and MQ traffic that passes through multiple endpoints.
...
- Open the Record Traffic wizard (you . You can access this it in a number of ways: from File>
- Go to File > New Record Traffic
- .
- Go to the New > Other > Virtualize > Traffic > Record Traffic.
- Choose Record Traffic from the New button’s
- menu
- .
- For each endpoint where you want to record traffic, do the following:
- In the Configure Proxies for Recording Traffic dialog, click Add. The wizard that opens will be pre-populated with any connections you have already configured.
- Under Proxy Type, select the desired transport (HTTP, JMS, MQ).
- Complete the proxy settings for the selected transport.
- JMS and MQ settings are the same as those used in message proxies; for details, see JMS Configuration and MQ Configuration.
- HTTP settings are different than those used in message proxies; for details, see Configuring Recording Proxies for HTTP.
- In the Traffic file field, specify where you want to save the traffic file that will be created to capture this traffic. You can later use this traffic file to generate virtual assets that represent the live traffic captured. When specifying the file name, you can use variables such as %d (for current date) and %t (for the current time).
- Specify how you want traffic data recorded in traffic files:
- Append new session data adds new traffic data to an existing traffic file (the one specified in the Traffic file field). If the specified file does not already exist, a new file will be created.
Overwrite session data overwrites the traffic data in an existing traffic file (the one specified in the Traffic file field). If the specified file does not already exist, a new file will be created.
- Click OK.
- From the application under test, generate the traffic that you want to record.
- Click Finish.
When live traffic is being captured, you can switch between the available tabs to view the requests and responses at each endpoint. The following screenshots show traffic being concurrently captured at 3 three different endpoints.
Virtualizing the Recorded Traffic
...
- Create Message Responders from the traffic files created—see Creating Message Responders from Traffic Files - Overview.
- Verifying that those Message Responders were automatically deployed as virtual assets—see Deploying Virtual Assets Virtualize.
Configuring Recording Proxies for HTTP
Anchor | ||||
---|---|---|---|---|
|
This section explains how to configure recording proxies for HTTP. This is different than the HTTP con-figuration configuration for deployable message proxies (which is discussed in HTTP Configuration). It covers:
...
- In the Proxy Connection Settings dialog, choose HTTP for the Proxy Type.
- Complete the appropriate HTTP settings.
- For server-side SSL, be sure to check enable Enable server-side SSL.
- For two-way SSL, be sure to check enable Enable client-side SSL and complete the Certificate and Private Key settings. Enabling client-side SSL will enable server-side SSL by default.
...
Due to the nature of SSL, Virtualize's proxy for HTTP recording generates a dynamic server certificate signed by its own certificate authority. In In order to accept this dynamic server certificate, the client generating the requests over HTTPS will need to be set up to trust all certificates. To do this:
- Ensure that the Server Certificate setting for Virtualize is set with Trust all certificates enabled (in Parasoft> Preferences> Parasoft > Preferences > Security) or that the service's Server Certificate is properly added to the Virtualize cacerts file (see Configuring for Services Deployed Over HTTPS for more details).
...
- Ensure that the Server Certificate setting for Virtualize is set with Trust all certificates enabled (in Parasoft> Preferences> Parasoft > Preferences > Security) or that the service's Server Certificate is properly added to the Virtualize cacerts file (see Configuring for Services Deployed Over HTTPS for more details).
- Make sure you have the client certificate keystore file (and— and if the client certificate and private key are stored in different keystores—the keystores, the private key keystore file) as well as relevant keystore passwords, keystore type information, private key password, and the name of the alias being used for the certificate/private key.
...
In the HTTP wizard page, be sure to enable the appropriate SSL option:
- For server-side SSL, be sure to check enable Enable server-side SSL.
- For two-way SSL, be sure to check enable Enable client-side SSL and complete the Certificate and Private Key settings. Enabling client-side SSL will enable server-side SSL by default.
...
- If the Client App is NOT a Browser: Modify your client application to point to the host and port where the Virtualize recording proxy is running. For For example, assume your app runs at
realapp.parasoft.com:80
and your proxy is running onmymachine.parasoft.com:44
(as specified in the wizard). You You would point your client app atmymachine.parasoft.com:44
instead ofrealapp.parasoft.com:80
, thus forcing the traffic to go through the proxy. - If you are using a browser to generate traffic against the web application:
- If the app does not require authentication—or authentication, or uses basic or Kerberos authentication, set
mymachine.parasoft.com:44
as the proxy in the browser. This This will redirect the traffic to the recording wizard proxy, and the traffic will get recorded. If the app requires digest authentication, do not set the proxy in the browser; instead, modify the URL that the browser is pointing to. In other words, instead of using
http://realapp.parasoft.com/mypage.html
, usehttp://mymachine.parasoft.com:44/mypage.html
. This will cause the traffic to get routed through the recording proxy.
- If the app does not require authentication—or authentication, or uses basic or Kerberos authentication, set