tpowers
16 years agoOccasional Contributor
Help with Mock Responses
Hi All;
I have been using SoapUI for a bit over a year now, purely as a client to file/retrieve data to/from a db. I was simply editing/copying requests to manually build test suites.
I now am charged with testing a WS client from my db against non existent services. I am able to manually mock up the responses, but now need to get a bit more dynamic in my responses.
I need to able to do 2 things....
1. Read a portion of the request (min 2 parameters, more in some cases) and use that to determine the mock response dispatch.
2. Return a portion of each request exactly as submitted.
Based on a little lurking here, and reading the help doc, I am thinking that scripting would be the best way to achieve both objectives...
Might someone be able to provide a simple example of each? Or possibly point to a tutorial(s). My presumption is that the dispatch scripting will take place in the 'Mock Operation Editor' and the defaulting behavior from request data will be scripted in the 'Mock Response Editor'
I currently am using the free 3.0.1.
I have very little coding experience, no groovy experience; but can alter once I get a simple working version of each.
Thanks in advance,
-Tim
I have been using SoapUI for a bit over a year now, purely as a client to file/retrieve data to/from a db. I was simply editing/copying requests to manually build test suites.
I now am charged with testing a WS client from my db against non existent services. I am able to manually mock up the responses, but now need to get a bit more dynamic in my responses.
I need to able to do 2 things....
1. Read a portion of the request (min 2 parameters, more in some cases) and use that to determine the mock response dispatch.
2. Return a portion of each request exactly as submitted.
Based on a little lurking here, and reading the help doc, I am thinking that scripting would be the best way to achieve both objectives...
Might someone be able to provide a simple example of each? Or possibly point to a tutorial(s). My presumption is that the dispatch scripting will take place in the 'Mock Operation Editor' and the defaulting behavior from request data will be scripted in the 'Mock Response Editor'
I currently am using the free 3.0.1.
I have very little coding experience, no groovy experience; but can alter once I get a simple working version of each.
Thanks in advance,
-Tim