Forum Discussion
I don't understand what the usecase is. You want your mock service to respond differently for one of your requests?
Hey,
I try out to be more clear:
I have two Web-Service, one used for receive requests (server),one used to send notifications (client)
I need to use the one which send the notification (client).
In one of my notification request, I have to use a "user id" value received in a request on the first web-service "server".
I create a Test Suite with the first test case is the mock response for the request containing the "user id" and I transmit this value to the second test case which send the notification using this parameter.
This works fine.
But to be operational, the whole system needs that I can respond to the whole Soap Methods of the 'server' web-service (using the same path and port) during my Test Suite (and I can not predict the requests that will be sent during this time).
I try to generate a MockService with all soap methods except the one uses in my test suite hoping that SoapUI will dispatch the requests to the MockService and to the Test suite but this does not work (my Test Suite do not receive the request and the Mock Service replies that the method is not implemented...).
Is there another manner to do with this testcase?
- mmsoap6 years agoNew Contributor
Hi Lucian,
does my answer enable to clarify my use case?
- Lucian6 years agoCommunity Hero
Hey mmsoap,
I am sorry but I don't know how to help you. I am not understanding the use case either :(
- mmsoap6 years agoNew Contributor
Ok thanks, I try a final time to be more explicit.
I have two web-services, one in server mode ” WS_1” (I generate the mockservice) and one in client mode “WS_2”
I have a client which sends me requests on my server-web service ” WS_1” and then I have to send him notification with my client web-service “WS_2” using a data contained in the notification I received (from WS_1)/
WS_1:
Remote client : request with data “toto”
Local server : reply OK
WS_2:
Local client: periodic notifications using the data “toto”
Remote server : reply ok
I know how to do this in a test case (Soap mock operation on WS_1 - transfer property – Soap requests on WS_2).
My problem is that, the client sends me a lot of requests on WS_1 (and if I do not answer, my notifications from WS_2 are refused) any time.
I know how to use the mockservice to reply to all of the WS_1 requests.
But I do not know how to use both the mockservice and my test case.
If they are both started, it is the mock service which replies to all requests even the one I am waiting in my Test Case so I never send my notifications.
I thought that it was possible to generate the mockservice for all soap methods except the one I use in my Soap Mock operation and that SoapUI will do the dispatch between the Soap Mock Service and the Test Suite (my Soap mock operation on WS_1). But this does not work.
Is there another manner to integrate the whole mock service in my test suite (the sequence of requests on WS_1 is not a predictable sequence). Or a manner to use external data from mock service in a test case?
Thanks for your patience 😊
Related Content
- 6 years ago
- 3 years ago
Recent Discussions
- 11 days ago