h_ixon
16 years agoOccasional Contributor
HOWTO - Check 2 fields in the request to choose mockResponse
Hello,
I have a mockService (with many mockOperation) in SoapUI wich work without problem. My request is sent and a response is received.
But now i want to choose my response on a mockOperation depending on two parameters in my request.
For example my request is (its a quick example)
I have 3 possible response in my mockOperation
The default response is "DefaultResponse"
If name is empty my response is "EmptyResponse"
If name is Billy and language is ES, my response will be "OtherResponse"
If name is Joe and language is EN, my response is "OtherResponseInEN"
I think check my parameters with Query_match but i don't know if query_match can do this (check many parameters).
So how to choose the response in a mockOperation by checking differents parameters in the request ? (the simple way)
I have a mockService (with many mockOperation) in SoapUI wich work without problem. My request is sent and a response is received.
But now i want to choose my response on a mockOperation depending on two parameters in my request.
For example my request is (its a quick example)
<example>
<name>Tom</name>
<language>EN</language>
</example>
I have 3 possible response in my mockOperation
The default response is "DefaultResponse"
If name is empty my response is "EmptyResponse"
If name is Billy and language is ES, my response will be "OtherResponse"
If name is Joe and language is EN, my response is "OtherResponseInEN"
I think check my parameters with Query_match but i don't know if query_match can do this (check many parameters).
So how to choose the response in a mockOperation by checking differents parameters in the request ? (the simple way)