Skip to main content

<requestData>

Description

Using the <requestData> tag, you can pass request parameters.

Body

JSON-object.

How to use

Consider the script:

...
state: Example
q!: data
a: {{ $request.data.field }}

state: Random
q!: random
random:
a: first
a: second
random:
a: first!
a: second!
a: third!
...

Script test:

...
<test-case>
<requestData>{ "field": "data from the request" }</requestData>
<q>data</q>
<a>data from the request</a>
</test-case>
...
<test-case>
<requestData>{ "smartRandom": [1, 2] }</requestData> //Data for `random` can be passed through`requestData
<q>random</q>
<a>second</a>
<a>third!</a>
</test-case>