2

While developing a web application I have the following use case:

  • a 3rd party Web Service with quite a lot of methods is deployed on a test server A (with a single endpoint, e.g. http://3rdPartyServer/3rdPartySvc?WSDL)
  • a new method is about to be implemented in the near future, but I need to use it now
  • the rest of the methods are used throughout my code extensively

So I would like to do the following:

  • Create a mock service in SoapUI locally, based on the new WSDL which includes the new WS method (i.e. a superset of the WS methods currently on server A)
  • point my local application server to use the SoapUI mock service endpoint
  • mock only the response of the new WS method (create a dummy response for it in SoapUI)
  • let the other WS method calls to reach server A and return whatever it returns normally (i.e. use SoapUI as a proxy for these calls)

I've gone through the SoapUI documentation regarding service mocking and have used it numerous times, but could not find an option for such "pass-through" behavior.

Giovanni
  • 332
  • 3
  • 12
  • Understand that you wanted to mock a service that is not currently available in the application. However, I did not get what you mean by 'pass-through' behaviour. Would you mind clarifying it? – Rao Mar 16 '16 at 19:06
  • @Rao: I've edited the question and added more detail, I hope it's got more clear now. – Giovanni Mar 17 '16 at 09:26
  • FWIW, I understood exactly what you've asked, because I found this looking for something similar. In my case, I want to pass through some subset of (REST) calls, then use my mock to force an error on one specific call. – dbreaux Apr 02 '18 at 14:58
  • 1
    Looks like no trivial way to do this: https://community.smartbear.com/t5/SoapUI-Open-Source/Mock-REST-service-as-a-mostly-passthrough/m-p/162043 – dbreaux Apr 04 '18 at 12:37

1 Answers1

0

When you read in your WSDL, the endpoint will point to your server.

  1. Open your service, and select the service endpoint.
  2. Add a second endpoint, to point to your mock. SoapUI has little bit of documentation showing this here. Only step "2. Getting Started" applies, not step 3!
  3. In each of your tests, where you are using the mocked method, you will need to select the mock endpoint. Further discussion is here.
Community
  • 1
  • 1
SiKing
  • 10,003
  • 10
  • 39
  • 90
  • Maybe I should've clarified that I was talking about connecting an application server to a mock service served by SoapUI - I thought that "mocking" was a term clear enough. So I'm not referring to testing a remote WS with SoapUI. I'll edit the question. – Giovanni Mar 17 '16 at 09:16
  • @Giovanni The way you rephrased the question, this becomes networking problem, not a SoapUI problem. You would just deploy the mock somewhere, and then have your network guy route the traffic as per your specification. – SiKing Mar 17 '16 at 15:17
  • 1
    It would be a networking issue if I wasn't referring to the development phase where I have a local app server and run SoapUI locally. What you propose is an interesting workaround, but apart from bringing an extra step to the process, how would the network guy understand and distinguish calls to the new method from the rest of the methods, given that they all calls are to the same endpoint (e.g. http://3rdPartyServer/3rdPartySvc?WSDL) - would he have to read inside the SOAP envelope? – Giovanni Mar 18 '16 at 10:27