This is an excerpt from Manning's book Testing Microservices with Mountebank. Login to get full access to this book.
Listing 7.13. Using a grouped match to copy a portion of the request path { "is": { "body": { "id": "$ID[1]", #1 ... } }, "_behaviors": { "copy": [{ "from": "path", "into": "$ID", #2 "using": { "method": "regex", "selector": "accounts/(\\w+)" #3 } }] } }
{ "is": { "body": { "id": "$ID[1]", #1 ... } }, "_behaviors": { "copy": [{ "from": "path", "into": "$ID", #2 "using": { "method": "regex", "selector": "accounts/(\\w+)" #3 } }] } }