Forum Discussion

birgerniss's avatar
birgerniss
New Contributor
12 years ago

Soap UI Pass through

Hi All,
I'm new to this board so I apologize if my question has been put before, but here we go:
Is it possible to set up Soap UI to mock a response to a specific request and read the response from the webservice to be tested for all other requests?

Your help is much appreciated!

Best regards
Birger Niss
  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2
    It is all about changing endpoint to each test, right?
  • birgerniss's avatar
    birgerniss
    New Contributor
    Hi Rao,
    What I had in mind was more that soapui could redirect the request to the service in question and when receiving the response redirect that to the caller, more or less like when soapui reads the answer from a file or a database.
    A don't think that soapui could change the endpoint - that endpoint is defined in the caller.
    BR
    Birger
  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2
    Assuming here is the case that you have
    Define a test suite -> test case.

    Test case contains 3 steps
    step1 - a soaprequest - using endpoint 1
    step2 - a soaprequest - using endpoint 2
    step3 - a mock soaprequest - using endpoing 3

    If all the services are running, and test case is run, it should be run smoothly.

    Other wise would you please eloborate?
  • birgerniss's avatar
    birgerniss
    New Contributor
    Hi Rao,
    First of all thanks for taking time to help:-)

    I want to test communication with service endpoint 1.
    I set up soapui listening on endpoint 2.
    During the test, the caller will ONLY communicate with endpoint 2.
    When the caller issues a request with parameter x set to a, soapui will mock a response and send it back to the caller.
    When the caller issues a request with parameter x set to anything but a, soapui calls the service at endpoint 1 with the request, receives the respond and sends that respond back to the caller.

    So only with x=a do we get a mocked response, otherwise we get the "real" response.

    Does that make sense?

    BR
    Birger
  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2
    Then you may need to explore groovy to make the calls conditionally.