0

I would like to use request model attributes in wiremock mappings newScenarioState field.

Is it possible to use request model attributes in newScenarioState field?

Example:

{
    "scenario" : "my-scenario",
    "newScenarioState" : "{{request.pathSegment.[1]}}",     //or {{request.someId}} ?

    "request" : {
       "urlPatternTemplate" : "/path/{someId}"
    }
}

Unfortunately {{request.pathSegment.[1]}} will be empty for newScenarioState, but it has proper value under request json node, looks like variable scope issue.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.