Forum Discussion

MayuriPatel's avatar
MayuriPatel
New Contributor
13 years ago

Mock Services Question : Urgent

Mock Services Question : Urgent

Postby MayuriPatel » 14 Feb 2013 16:04
I have an web application that is a client of a
few other web applications. I am trying to test one web method, labeled
web method A, that follows the following order of operations.

Web method A of web app 1 receives a request
Web method A sends a request to web method B of web app 2
Web method A receives a response from web method B of web app 2
Web method A sends a request to web method C of web app 3
Web method A receives a response from web method C of web app 3
Web method A does a few calculations
Web method A of web app 1 sends a response.

The
way I am set up right now is that I have set the endpoints in my
application for web app 2 and web app 3 to soapui mocked services that
mock those services. Currently I am able to use soapui to send a
request to web method A then see all the requests it makes to other web
apps.

Right now I am trying to set up a test suite to send the
initial request then test the requests it makes to other services. I
have been trying to use the MockResponse test step in order to receive
the requests, but I keep running into a problem with the TestRequest
that makes the initial request. It waits until it receives a response
before it moves on to the MockResponse test step.

Can anyone tell me how I can test this correctly?

1 Reply

  • Hi,

    I have the following suggestion for an environment setup to test this that might help.

    1) Create a test case that calls your service A

    2) Create two separate test cases that each contain a MockResponse test step, representing B and C respectively.

    3) In these MockResponse test steps, set up to test the incoming requests in the way you want.

    4) Set up A to call B and C.

    In order for this to work, all the test cases must be running in parallel, so you will have to make sure to select the "The selected TestCases are run in parallel" option on the TestSuite level.

    Hope this helps!

    Regards,

    Arian
    SmartBear Sweden