Forum Discussion

Buschfunk's avatar
Buschfunk
Frequent Contributor
14 years ago

Enhance mock service creation

Hello,

with its test steps (DataSource, DataSink, Delay, etc.) soapUI Pro offers a lot of comfortable ways for creating SOAP requests. Creating mock services however is rather neglected. It would be great if there were similar functionalites for creating mock services as for creating requests.

Cheers,
Robert
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Robert!

    Interesting.. do you mean a response from a MockService would actually be a number of "Steps" that would be executed? Please elaborate!

    regards,

    /Ole
    eviware.com
  • Buschfunk's avatar
    Buschfunk
    Frequent Contributor
    Hi Ole,

    Yes, I think you understand my idea So far, mock responses are rather static. Of course it is possible to make the responses more dynamic using Groovy scripts however this is pretty complicated compared to using test steps in the test cases.

    To be honest, I don't yet have a concrete idea how this could look like in soapUI but something similar to the different test steps.

    Cheers,
    Robert
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    weeman wrote:
    Are there any news regarding this topic?

    Hi Robert!

    I'll make sure Ole sees this topic, but I personally haven't heard anything new regarding this. It's an interesting topic though and I have now created an issue for this in our backlog [SOAPUI-3008], which makes sure our head of product sees this eventually.

    So if I understand you correctly, you would like to have better building blocks for creating mock responses. Maybe have each mock response modeled similarly to a functional TestCase, with different MockResponseSteps to choose from?

    Thanks

    /Henrik
    SmartBear
  • Buschfunk's avatar
    Buschfunk
    Frequent Contributor
    Hello Henrik,

    Yes, exactly.

    As an example, we are using soapUI Pro for mocking a lot of webservices and there is a need to reply with dynamic responses. The data for these responses may come from a database, a text file, an XML structure, etc. In the current version I manually scripted the database access to retrieve the test data based on certain input values in the request message. However it would be a lot easier and less error-prone doing this with some kind of "MockStep".

    What I'm thinking of is an analog to the "TestSteps", e.g. inserting delays, defining data sources, loops, etc. I'm just brainstorming...

    Sincerely,
    Robert
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Robert,

    Thanks for following up - I definitely agree with you that creating dynamic responses requires a lot of scripting that could perhaps be replaced with some test-step-like functionality - I'll get Magnus (the soapUI Product Manager) to have a look at this so he can give his input and ideas..

    regards!

    /Ole
    SmartBear Software