Previous Topic: Add, Change, and Delete SignaturesNext Topic: Comparison Operators for Arguments


Import Request/Response Pairs

A request/response pair consists of one request file and one or more response files.

When you import a request/response pair, the request is processed against the virtual service.

If the virtual service contains a signature with the same arguments, a specific transaction is added to the signature.

If the virtual service does not contain a signature with the same arguments, a signature is added. The details of the request and response are added as a specific transaction in the signature. A default transaction is also added.

The request/response pair must be in text or XML format.

The following list contains an example of the file names in a request/response pair:

The request file name must include a prefix followed by the string -req.

The response file name must include the same prefix followed by the string -rsp. As the preceding example shows, you can provide multiple response files by adding a number after the string -rsp. Multiple response files are applicable to messaging scenarios.

You can specify request and response metadata by including one or more sidecar files. For more information, see Sidecar Files with Request/Response Pairs.

Note: If the virtual service is based on a transport protocol other than HTTP, this feature has the following prerequisite: Open the corresponding virtual service model in DevTest Workstation and enter the path to the recording session file in the Documentation field. A recording session file is one of the following files:

VRS file

Generated by the Virtual Service Image Recorder in DevTest Workstation.

VR2 file

Generated by the CA Service Virtualization Recorder in the DevTest Portal.

Follow these steps:

  1. Open a virtual service.
  2. In the Stateless Signatures pane, click the Add button and select Import Request/Response Pairs.

    The Import Request/Response Pairs dialog opens.

  3. Specify the files that contain the request/response pairs. You can drag the files into the dialog, or you can click a button to select the files from a file system.
  4. Click Done.