Forum Discussion

Knowledge's avatar
Knowledge
Contributor
9 years ago

Mock Service test step help

Hi,

 

I'm having problems with the mock test step.

I have a service that sends requests to the soap ui mock service.

When i start the mock service itself, it receive the request successfully and everything is working well.

When i try to do it with a mock test step, and i write the same port and path used by the mock service, i get a connection refused error in my service. If i start the mock service back up again, it works well.

 

Did anyone encounter with this issue? any idea what do i need to do to make it work?

 

Thanks.

  • Well... i found what the problem was...

    The problem was that my service sent the request too fast, so by the time the mock step was started the request was already sent.

    I looked in the properties of the mock step and found a field called "Start Step" which was empty.

    I selected the 1st step(which is the initial request) and re tested and it works!

     

    Thanks a lot for trying to help, and sorry for wasting your time... :(

  • rupert_anderson's avatar
    rupert_anderson
    Valued Contributor

    Hi,

     

    Are you saying that you try to start the Mock and Mock Response TestStep on the same port on the same machine? If so, this will not work (you'll get something like connection refused / port already in use), please use different ports for each - apologies if you already knew this, just checking what you mean.

     

    Regards,

    Rupert

    • Knowledge's avatar
      Knowledge
      Contributor

      Thanks for your reply, but I know that already :)

       

      I mention that so it will be clear that when it's the mock running, my service is sending the request successfully, and when it's the mock test step, it fails. But I am not running it on the same time.

      I have no idea where the problem could be...

      • rupert_anderson's avatar
        rupert_anderson
        Valued Contributor

        Ok, sorry, I did think you might know that! :-)

         

        So does the MockResponse TestStep start up OK? Can you see it running?

         

        If so, when running the TestCase, in the SoapUI log tab you should see something like:

         

        Wed Jul 13 09:34:07 BST 2016:INFO:Mounted WSDL for interface [InvoicePortBinding] at [/?WSDL]
        Wed Jul 13 09:34:07 BST 2016:INFO:Started mockService [SOAP Mock Response] on port [7001] at path [/]

         

        And the icon of the MockResponse TestStep should be animated.

         

        Thanks,
        Rup