Skip to main content

<responseData>

Description

The most flexible option to check the answer of the bot. The <responseData> tag allows you to check all the fields of the $response.data. Only fields specified inside the tag body are checked.

Attributes

  • field — JSONPath-expression, optional attribute. Allows you to specify which part of the $response.data object should be checked.

Body

JSON-object or primitive.

How to use

<responseData>{
"replies": [
{
"type": "text",
"text": "Checking the full object $response.data",
"state": "/1"
}
],
"answer": "Checking the full object $response.data" }
</responseData>

<responseData>{
"answer": "It is not necessary to specify all fields when checking"
}</responseData>

<responseData field="replies[0].buttons">
[
{"text": "Button 1"},
{"text": "Button 2", "transition": "/1/handler2"}
]
</responseData>

<responseData field="smartRandom">[1, 2]</responseData> //All random numbers generated during the test are written to `$response.data.smartRandom`