groovy - SoapUI Mock service groovey script to select right response -


i have mock service has operation 2 possible responses. how can select right response based on condition using scripting? eg.

if(context.sessionid == ''){  // use response 1  } else {  // use response 2 } 

if code in dispatch script of "mockresponses" correct syntax is:

return "response 1" 

[edit] well-explained in official web-site: http://www.soapui.org/service-mocking/creating-dynamic-mockservices.html#5-selecting-a-response-based-on-the-request


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -