In Karate I can create scenario for mock server using pathMAtch
. Is there a possibility to create scenario based on input (body) to say something like this:
for input X expect response Y
for input A expect response B
Note that the request
variable is always available to do JS operations: https://stackoverflow.com/a/67589246/143475
And yes, you can use bodyPath()
: https://stackoverflow.com/a/54911983/143475
More ideas: https://stackoverflow.com/a/63708918/143475