The Multiple Responses view allows you to specify which responses to use for specific requests. It is available only for Message Responders.

Conditions

Specify the set that must be met for the correlated response to be sent. You can set conditions using one or more of the following methods:

  • Specifying XPath condition in the request body
  • Specifying URL parameters in the HTTP URL
  • Specifying URL paths for RESTful services.



When specifying a URL path, just click the hyperlink to the desired path segment’s name; this will automatically add the appropriate path index.

Always Send a Response

By default, the Enable correlation option is enabled for response conditions. This option makes the condition required in order to send a response. Add a condition to the end of the list and disable the Enable correlation option to always send a final catch-all response regardless of whether the specified conditions are met. You must disable the option for all condition types (Request Body, HTTP URL Parameters, URL Paths) to enable this behavior.

If more than one XPath or URL parameter matches a response, Virtualize will return the first matching response in the list (use the Up and Down buttons to specify the desired order or responses). If the XPath or URL parameter provided for each response results in a unique match, the order of the responses is irrelevant.

Message

The Message tab specifies what response is sent if the conditions are met. You can access data source values (from data sources or data banks) by using  the ${ } syntax. For example, use ${title} to reference the keyword column from a data source or the data bank tool. Use ${books:publisher} to reference the publisher column from the books sheet of an Excel data source.

Performance Options

The Performance Options tab specifies the additional response delay: the time that Virtualize will wait before returning the corresponding response message. Think time values specified here will be added to any think time specified in the Service Options tab> Performance Options page, plus any additional delays specified via performance profiles, which are described in Working with Performance Profiles.

For example, assume you specify 1000 in the Message Responder think time, specify 2000 for one response message in the Multiple Responses area, and leave the other messages at zero additional think time. Virtualize will take 3000 milliseconds (3 seconds) to return the response message for that one message and take 1000 milliseconds (1 second) to return the responses for the other messages.

  • No labels