The mock step allows to imitate to-be API calls, that do not yet exist.
Mandatory fields:
call
, with valuereflect.mock
- determines the step typeargs
- response
- ...response values
- response
Optional fields:
args
- request
- url
- query
- body
- headers
- request
result
- name of the variable to store the response of the mock in, for use in other steps
The mock step imitates the result of a http step - therefore results are stored into the application context the same way as with http steps: GET step responses
step_1:
call: reflect.mock
args:
response:
project: "Bürokratt"
website: "www.kratid.ee"
result: reflected_request
step_2:
return: ${reflected_request.response}
step_1:
call: reflect.mock
args:
request:
url: https://www.example-url.com
response:
project: "Bürokratt"
website: "www.kratid.ee"
result: reflected_request
step_2:
return: ${reflected_request}