hi guys, As the title suggest, I'm trying to learn how to mock a service. And as a result, I am reading this tutorial on mocking a service. Now, in the spirit of making sure I understand ever...
I think they have made a mistake in their terminology in step 4. (that I think you are referring to) - They should say 'you should get one operation (ConversionRate) and one Response (Response 1) - not 'one request', as mocks don't make requests in SoapUI , they receive them and make responses (sometimes they may make custom requests in SoapUI using Groovy scripting).
I think they have made a mistake in their terminology in step 4. (that I think you are referring to) - They should say 'you should get one operation (ConversionRate) and one Response (Response 1) - not 'one request', as mocks don't make requests in SoapUI , they receive them and make responses (sometimes they may make custom requests in SoapUI using Groovy scripting).
It appears simple things like that trips a SOAP UI newbie like myself.
Again, much appreciated.
Will be posting more questions as I go along. I sure hope I'm sending the mto the right place.
Just a complimentary question. Can I confirm that an operation could have more than one response? I am asking because the response is numbered with a '1'.
Personally, I dont see how this is logical. But figured I ask.
Also, is your book SOAP UI Cookbook aimed at SOAP UI newbies?
You're welcome, I like helping where I can, it can also help me think of new potential blog topics or enhancements for areas where people might value help.
Whilst I ended up liking SoapUI, I must confess that I didn't find it intuitive or easy to figure out when I first tried to use it, so I think you aren't alone! :-)
I would say this forum is the best place for questions like this - there are some nice topics / answers in here. Some people also use stack overflow, but I don't contribute there for SoapUI stuff.
The practical answer to your question may soon present itself the further you go. One typical use of mocks in SoapUI is to despatch different responses based on the request e.g. mocking an error response based on certain request properties. Having the ability to add a range of responses allows people to easily add responses with different content. Take a look at the response (double click it) in your mock:
Notice the dispatch type options and default response, these give useful ways to tell the mock which response to pick. The most powerful is the script type - we can cover that if you need it!
Thanks for asking about my book. Whilst it is designed for intermediate SoapUI people, I tried to make most of the recipes complete worked examples, so I don't think you would have a problem making use of it. Its meant to complement the SoapUI wiki really, would love to know any feedback. Chapter 3 covers mocks.
Again thanks for the detailed response. Much appreciated.
Another question. In Step 4, line 4. It stated "As you can see the MockService returned the values we entered earlier as the response".
I was expecting a GUI window or something to display the value I entered in the previous step. Instead, the response window came up with the xml script that was generated + the value I entered.
Is this what happens when you get a response using SOAP UI? You basically get the XML response, just like your application would, if you were making a call to the service?