Forum Discussion

shnplr's avatar
shnplr
New Contributor
12 years ago

[Res]How to assert external request received by mock service

Hi,
In my test suite the http/soap request is sent to a 'live' service (running on localhost) and I get a response. This service then transforms the message asynchronously and sends it to another service. The 2nd transformed request is what I need to assert. I have a mock service running for the 2nd service.

The mock service receives the request from external application and returns a response OK.

How do a assert the incoming request to the mock service with respect to the current test case?

I tried using mock response test step (instead of mock service) and I am unable to assert the incoming request however the response for the mock response is not delivered to the external client - so I think I need to use mock service.

So somehow I need to link the request received by the mock service back to the particular test step that initiated the request.

I'd be grateful for any hints

Thanks,

Paul

2 Replies

  • abhishek813's avatar
    abhishek813
    Frequent Contributor
    This is really interesting, i don't have an actual solution but a few suggestions.

    1. In real life how will the client verify that the data was correctly processed?

    2. what is the response you get in soapUI

    3. maybe you could log the request received and response sent. If the request data(match any unique characteristic) matches what u originally sent then it was success.

    Whenever you are able to resolve this, please do post the solution here. I am curious to know the solution.