Ask a Question

mock service is cycling through responses despite being different requests

SOLVED
BryceLeong
Senior Member

mock service is cycling through responses despite being different requests

I have three independent requests with different input values and each should have it's own response paired with it. Despite this, when I invoke a request, it will cycle through the three responses. I included two screenshots to show expected and actual behavior.

1 ACCEPTED SOLUTION

Accepted Solutions
minoseah629
Occasional Contributor

Re: mock service is cycling through responses despite being different requests

I figured out what I was doing wrong since no one replied.

 

I put an incorrect xpath schema. 

View solution in original post

6 REPLIES 6
minoseah629
Occasional Contributor

Re: mock service is cycling through responses despite being different requests

To extend on this issue from @BryceLeong , the project has enabled Mock SSL on and Mock Port 8088 as our https mock service.  

 

There are several projects within this workspace.  

 

This link here is a screencast of what is happening for both of us. https://www.screencast.com/t/lJLKYZQonQA

 

Request 101010101 should correspond to 101010101. 

Request 202020202 should correspond to 202020202. 

 

But when invoking the either request, the response cycles through the responses.  

 

In the attempt to use SoapUI as a mock service, this provides a impediment in our testing activity for our application's ability to integrate with an external service.

 

2017-04-18 17_49_40-SoapUI 5.3.0.png

nmrao
Community Hero

Re: mock service is cycling through responses despite being different requests

Thank you for the screen shots and screen cast. However, it is not shown what is the despatch criteria while implementing mocker service.


Regards,
Rao.
minoseah629
Occasional Contributor

Re: mock service is cycling through responses despite being different requests


@nmrao wrote:
Thank you for the screen shots and screen cast. However, it is not shown what is the despatch criteria while implementing mocker service.

I am not sure what this mean.  What would you need to see to help understand what is happening?

nmrao
Community Hero

Re: mock service is cycling through responses despite being different requests

I meant what is the logic that you write which decides what to send as response? which is called Dispath Criteria - Script / Xpath etc?


Regards,
Rao.
minoseah629
Occasional Contributor

Re: mock service is cycling through responses despite being different requests

So I see what you are describing on dispatch criteria.  

 

SOAP UI is still very new to me and functionality is not obvious. 

 

My initial impression on what SOAP UI mock service would do is if I have a request with specific data, then I would receive the response that is associated to the respective request.  

 

In reviewing this tutorial, I saw exactly what are you talking about dispatch criteria. 

https://www.soapui.org/tutorials/web-service-sample-project.html

 

But number 6 does not go into detail on how to do what my initial impression above.  

 

I then found this link that described dispatching in little detail. 

https://www.soapui.org/soap-mocking/mockoperations-and-responses.html

 

I tried to follow the pattern shown on this page for query-match. 

2017-04-19 12_34_17-SoapUI 5.3.0.png

I think I am close to what I need.  

 

But when I add a second request, I click Play after submitting a request with new data, I get this:

 

2017-04-19 12_45_44-SoapUI 5.3.0.png

 

But I expect to see response 2.  

 

Thoughts on what I am doing incorrectly?

 

minoseah629
Occasional Contributor

Re: mock service is cycling through responses despite being different requests

I figured out what I was doing wrong since no one replied.

 

I put an incorrect xpath schema. 

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: