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

Conditions

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

  • Specifying name/value pairs for transport headers 
  • Specifying XPath condition in the request body
  • Specifying URL parameters in the HTTP URL
  • Specifying URL paths in the HTTP URL
  • Specifying HTTP methods sent in the request
  • Scripting a custom condition

See Responder Correlation Tab in the Message Responder Overview chapter for information about how to configure the responder correlation settings.

If the request matches one or more response conditions, 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 parameter provided for each response results in a unique match, the order of the responses is irrelevant.

Always Sending a Response

By default, the Enable correlation option is enabled for Request Body 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 to enable this behavior.

Duplicating Responses

You can right-click on responses to access copy and paste functions.

A copied response will be pasted to the end of the response list. All configuration settings will be copied to the pasted response.

Message Tab

You can configure the message the responder sends in the Message tab.

  1. Choose a response and click the Message tab. 
  2. Choose a method for specifying the response. You can choose the following options:
    • Text: Enable the Text option and enter a literal message in the field.
    • File: Enable the File option and browse for a file that you want to respond with.
    • Data Source: Enable the Data Source option and choose a column from the global- or suite-level data source. You can access data source values from responder suite variables and data banks.

Response Headers Tab

By default, the responder uses the settings configured in the Transport Header tab for response headers, but you can override the settings for each response in the sequence.

  1. Click the Response Headers tab and enable the Override responder transport headers option.
  2. Click on the tab for your message transport type.
  3. Use the controls to add, remove, and modify the header values.
  4. Save your changes. 

Response Options Tab

You can specify response codes and configure time delays for responses in the Response Options tab.

  1. Choose a response and click the Response Options tab.
  2. If you want to configure a custom HTTP status code for the message, enable the Override Responder Return Status option and specify a return message and status code. You can enter a fixed message and code into the field or specify a parameterized message and/or status code from a connected data source.  
  3. If you want to bypass the message proxy's failover setting (as set in the HTTP Reverse Proxy or HTTP Forward Proxy) for internally routed error messages, enable Skip message proxy failover to send the custom return status and payload configured in the response.
  4. If you want to add additional delay time to the response, specify the number of milliseconds to be added in the Think time field. Think time will be added to any think time specified in the Options tab> Performance Options page, as well as any additional delays specified via performance profiles (see Working with Performance Profiles). 

Request Template Tab

The Request Template tab contains the same functionality as the tab of the same name found on the Options tab for the message responder, only applied to the specific response. If both are populated, this one takes precedence. See "Request Template" on the Message Responder Overview page for more information.

  • No labels