In this section:
Recording from a Message Proxy
When a message proxy (introduced in Working with Message Proxies) is in record mode, it can monitor traffic over the specified transport as an application is exercised. Virtualize "listens" to traffic requests and responses, then builds a traffic file of legitimate request/response pairs. This traffic is then used to generate and deploy a virtual asset that virtualizes the captured behavior (returning virtualized responses that correlate to the incoming request messages based on the traffic captured).
There are three main steps involved in virtualizing this application behavior:
- Capturing traffic in a file. You simply start the recording from a message proxy that is already configured and deployed. Virtualize monitors the traffic across the specified endpoints, then builds a traffic file from the requests and responses captured as you exercised your use cases.
- Creating Message Responders from that traffic file.
- Verifying that those Message Responders were automatically deployed as a virtual asset.
Once you have set up a message proxy you can simultaneously capture live traffic across the endpoint(s) as follows:
- Start the recording in one of the following ways:
- In the Virtualize Server tree, right-click the appropriate proxy, then choose Start Recording.
- In the proxy’s configuration panel, click Start Recording.
- In the Virtualize Server tree, right-click the appropriate proxy, then choose Start Recording.
- From the application under test, generate the traffic that you want to record.
- Stop the recording in one of the following ways:
- In the Virtualize Server tree, right-click the appropriate proxy, then choose Stop Recording.
- proxy’s configuration panel, click Stop Recording.
Notes
- The next time you start recording, the traffic files will be reset and cleared unless you selected the Append new session data option.
- If you disable or remove a proxy while it is recording, any pending messages will be written to the files and the recording will stop.
- Recording mode does not persist when the proxy is disabled or Virtualize server is stopped/restarted.
- HTTP traffic files recorded in Virtualize 9.10.x cannot be used with Parasoft Virtualize 9.9.x and earlier.
In this video, we describe how to monitor and record traffic from a message proxy .Video Tutorial: Monitoring and Recording Traffic from a Message Proxy
Virtualizing the Recorded Traffic
Once you have recorded traffic, you can create and deploy virtual assets as follows:
- 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 - Overview