shnplr
12 years agoNew Contributor
[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
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