Using mocking in SoapUI Pro
I work at a company where we use licensed SoapUI Pro. I have a REST (POST) step in my test case. Now I would like to mock the JSON reply to avoid contacting the real service every time. I don´t have ServiceV but I sin in SoapUI Pro that there is a InsertStep functionality called "REST VirtResponse"
How can I use this one? How do I connect it to my REST (POST) step so that when I run that one the mocked answer will be run?
I also read that this mocking functionalty exist in open source SoapUI. Is that also found in licensed version as well?
Any input regarding this is appriciated.
1.) On the "Projects" Tab of ReadyAPI, you can double-click the WSDL/REST binding, which will allow you to click on the "Endpoints" for that service. There, you can define multiple endpoints to have available in the drop down menu. To make this easier on me, I actually parameterized the endpoint I use to ${#TestSuite#EndPoint} and I store the endpoint value as a custom property at the test suite level. This way, if I ever need to change between a mock and a real service, or different environments, I can adjust that custom level property and have everything change to that. It makes it a lot easier for me.
2.) I am not 100% familiar with virtual services, but I can usually get them all under the same port if I add them all to the same virt.
3.) SoapUI would need the endpoints defined at the Projects level tab, if I understand this question correctly.