Response Dispatching

Applies to ReadyAPI 3.54, last modified on July 23, 2024

You can define several responses for an operation in your virtual service. The Dispatch Style setting of an operation specifies which response the virtual service returns in this or that case:

Dispatch Style setting

Click the image to enlarge it.

The following dispatch types are available:

Dispatch Type Description
Sequence Returns responses in series.
Random Returns a response selected randomly.
Query Match Selects a response based on the data of the incoming request.
XPath Selects a response by retrieving data from the incoming request with an XPath expression.
Script Selects a response by running a script code.
Conditional Match Selects a response by pairing specific requests with specific responses.
Parameter Selects a response by analyzing parameters of the incoming request.
Available for REST virtual services only.
Notes
  • Virtual services can support a limited set of dispatch types:

    Sequence Random Script Query Match XPath Conditional Match Parameter

    REST

    Supported

    Supported

    Supported

    Supported

    Supported

    Supported

    Supported

    SOAP

    Supported

    Supported

    Supported

    Supported

    Supported

    JMS

    Supported

    Supported

    Supported

    Supported

    Supported

    JDBC

    Supported

    Supported

    Supported

    TCP

    Supported

    Supported

    Supported

  • The dispatch strategies are mutually exclusive and cannot be combined. If you need an advanced response selector, use the Script or Conditional Match dispatch type.

See Also

Configuring Virtual Services

Highlight search results