Rest Op - Expect Response
Overview
The REST Expect Response operation represents the receipt of the response of a previous REST Send Request operation. The test instance will abort if any other inbound message is received.
This message is received by the IN Tester when it is expecting a REST response.
- Direction: INBOUND
 - From: External Rest API
 - To: IN Tester
 
Attributes
The operation attributes are as follows.
| Attribute | Type | Description | 
|---|---|---|
            type
         | 
        String | 
            rest.ExpectResponse
         | 
    
            label
         | 
        String | 
            An optional label for this node if it is to be the target of a branch operation.
         | 
    
            tests
         | 
        Array of Object | 
            An array of anonymous Objects.  Each Object represents a check to be performed.  The associated
            Pass/Fail entries will be generated in the test instance check_log.Refer to the Operation Tests documentation for more information on the syntext for Operation tests.
         | 
    
The root of the kpath in the tests Array is the rest object from the returned
REST-C-RESPONSE message.
The rest object of the most recently received REST response is also available to subsequent
evaluations as $v->{__INBOUND}{REST} or $i->{REST}.
If the returned rest.content_type = text/json or application.json, then the TestInstance will
attempt to decode the returned rest.content into a JSON object and make it available as rest.content_json.
Example
This is an example entry within the operations array:
{
    "type": "rest.ExpectResponse",
    "tests": [
        { "kpath": "rest.code", "type": "string", "value": "200" },
        { "kpath": "rest.content_json.status", "type": "string", "value": "OK" },
        { "kpath": "rest.http_headers.[name=Test-Hdr].[0].value", "value": "Value 3" }
    ]
}
Arguments
The REST Expect Response operation has no defined arguments.