This topic explains the general procedure for creating message proxies.
In this section:
To create a message proxy:
%n_%d_%t.txt
(<proxy_name>_<current_date>_<current_time>.txt
). It will be stored within the recorded_traffic
folder (this will be created if it does not exist). You can modify the file name, but not the folder. The folder is always located within the VirtualAssets project.%nProxyTraffic%d
or %u_%d%nTraffic
You can now enable the proxy as described in Enabling and Disabling Proxies then start recording as described in Recording Traffic from Message Proxies.
Configuring an HTTP Message Proxy Video TutorialThis video describes how to set up a message proxy that can capture live traffic. |
The following table explains how Virtualize records traffic data with different combinations of traffic file name values and recording session options:
Traffic file name | Recording session option | Result |
---|---|---|
Default / parameterized | Append new session data | Creates one new file that includes all request/response pairs in the recording session. |
Static | Append new session data | Adds new traffic data to the specified traffic file (if it exists). Otherwise, creates one new file that includes all request/response pairs in the recording session. |
Default / parameterized | Overwrite session data | Creates one new file that includes all request/response pairs in the recording session. |
Static | Overwrite session data | Overwrites existing traffic data in the specified traffic file (if it exists). Otherwise, creates one new file that includes all request/response pairs in the recording session. |
Default / parameterized | New session file for each message pair | Creates one new file for each request/response pair in the recording session. If multiple request/response pairs are detected, multiple files are created. |
Static | New session file for each message pair | If the specified file exists, overwrites existing traffic data every time an additional request/response pair is detected. If the specified file does not exist, creates one new file for the first request/response pair, then overwrites existing traffic data every time an additional request/response pair is detected. In both cases, the resulting file contains only the most recent request/response pair. |
If a proxy uses the internal protocol and receives MQ traffic while recording, the New session file for each message pair option is not supported. If this option is selected, Virtualize will default to Overwrite session data behavior.
To move a proxy from one Virtualize server to another, simply drag and drop (or copy/paste) it.
If your proxies and/or Message Forward tools inadvertently set up a forwarding cycle like A> B> C> A, this could result in an infinite loop. To prevent such loops, Virtualize is configured to stop forwarding after 10 hops. You can change this by setting the system property parasoft.proxy.loop.max.limit
(e.g., parasoft.proxy.loop.max.limit=5
).
Note that this loop detection applies only to internally-routed forwarding (e.g., it applies to routing to localhost, not routing to a host name).