Skip to content
On this page

Empower Your Test Results with AI-Powered Insights ->

Interaction

An interaction adds behavior to the mock server.

Options

PropertyDescription
idid of the interaction
strictenable/disable strict matching
providername of the provider
flowname of the flow
backgroundis a background call
requestrequest details
request.methodHTTP method
request.pathapi path
request.pathParamsapi path params
request.headersrequest headers
request.cookiesrequest cookies
request.queryParamsquery parameters
request.bodyrequest body
request.graphQLgraphQL details
request.graphQL.querygraphQL query
request.graphQL.variablesgraphQL variables
responseresponse details
response.statusresponse status code
response.headersresponse headers
response.cookiesresponse cookies
response.bodyresponse body
response.filepath of the file to return
response.fixedDelaydelays the response by ms
response.randomDelayrandom delay details
response.randomDelay.mindelay the response by min ms
response.randomDelay.maxdelay the response by max ms
response.onCallresponse on consecutive calls
response(req, res)response with custom function
expectsexpectations are used in component testing
expects.disabledisable checks
expects.exercisedcheck exercised (default: true)
expects.callCountcheck call count (default: > 0)
storesstores data from the request

Released under the MIT License.