Forum Discussion
- nmraoChampion Level 2
Not sure if such step is available.
However one can create a mock service and send response from there as shown in the below video, please if that helps
- nemesdanielaNew Contributor
Thank you for your prompt response, nmrao . I really appreciate your input.
It is a good option for those who want to mock the entire service or maybe I am missing something. I really need to add only 2-3 mock responses in my current project to mock a different service that we send/receive responses and that is not under our control.
So my project includes several services that we manage and we are working on integrating it with a different service that is not under our control. So I want to have 1 mock service with 2-3 mocked requests/responses to simulate the integration with that different project.
And I want to include that mock part into test suites and test cases for the integration simulation part (so a combination of our service and their mocked service). Any idea that I thought about on how to call that specific mock service response from my test suite did not work.
I don't see how they have omitted that option entirely since more and more projects are using REST services :(.
In any case, if someone has an idea on how to call a mock REST response into a test suite/test case please share this with us.
Maybe I need to look a bit more into groovy scripting and maybe this can be done that way.Thanks again for your help.
- nmraoChampion Level 2Your screen shot is the first time I see such step. Earlier, even for SOAP, people have to use mock service if they need create the tests while actual service is in development which is main purpose of mock services.
In the mock services, one can use simple static response or dynamic response (which needs more groovy scripting for this)
One can run the mock services before running the tests, so that mock services will provide the response for the test requests. But it (starting mock services) needs to be done automatic start, then needs search further, am sure someone might have already done that.
Related Content
Recent Discussions
- 7 days ago