Forum Discussion

amirse's avatar
amirse
Contributor
6 years ago
Solved

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 ...
  • groovyguy's avatar
    groovyguy
    6 years ago

    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.