Reputation: 13
I'm trying to automatically trigger a REST request with a groovy script "OnRequest Script" when my mockservice receives a request.
From "OnRequest Script" I have access to "log, context, mockRequest and mockRunner" variables.
How can I run a testStep or a TestCase from my mockService? Is it possible?
Can I create a new REST request in my mockService and send it?
Upvotes: 1
Views: 372
Reputation: 881
You can create REST request using HTTPBuilder in groovy script.
Examples: get request, post request
Or you can use RESTClient - it is an extension of HTTPBuilder
Upvotes: 3