Forum Discussion

ientin01's avatar
12 years ago

can mock service simulate response time delay

Hi there

I"m new to SOAP UI. We will probably need SOAP UI Pro to simulate responses from several interfaced systems, but I have specific requirement to simulate response time delay. This is to ensure that we properly simulate response from an interfaced system

I also have an optional, but very important requirement, to be able to change response time "on the fly" during the test run to simulate performance degradation of an interfaced system, or be able to switch mock service on/off also on the fly to simulate failure of an interfaced system.

Please let me know if that's feasible with SOAP UI Pro. I really appreciate it.

My alternative (I know that they do have these features) ITKO Lisa, Parasoft's Virtualize, or HP Service Virtualization, but the price is crazy. Hence the research for alternative solution.

Kind Regards
Igor
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi
    I've just seen your post, maybe it is not to late for an answer

    be able to switch mock service on/off also on the fly to simulate failure of an interfaced system.

    definitively yes, just stop the mock service, then restart it if neeeded


    be able to change response time "on the fly" during the test run to simulate performance degradation of an interfaced system

    on response definition, you can add groovy script to make the service wait before providing the response
    see this post for a static response time: viewtopic.php?f=5&t=20404#p46042
    In your case, the script will need to access external resources where you store the information to make it increase/decrease this waiting time and so modify the behaviour of the mock service on the fly
    The only drawback of this method is that you will need to configure all responses. But as you use soapui pro, you can put the script in an external file to avoid duplication

    Maybe a better solution could be to put this on the "OnRequest script" tab (see http://www.soapui.org/Service-Mocking/c ... g-overview). In this case, no duplications


    Check also this documentation: http://www.soapui.org/Service-Mocking/c ... vices.html