Service Virtualization

 View Only
  • 1.  No found scenario response on VS

    Posted May 19, 2016 05:00 PM

    Hi guys!

      How can I design a "no found scenario" response in a VS? Like an exception when a sent request is not found among the requests created in the VS image.  Right now if the request is not found I'm receiving something like a dummy random "right" response that depends on the datatype.




  • 2.  Re: No found scenario response on VS

    Posted May 19, 2016 07:01 PM

    Hi Patricio


    If you want simulate an message exception response I achieved in two ways:


    1. Make your request doesn't match with any of your transactions in VSI, so the VS will send a response message which can be defined in Service Image tab (check response for unknown conversational/stateless request ) and it would be the exception you are interested in.

    2. You have a transaction in the VSI, but the response could be a message exception. i.e from the soap fault message type. It will be an scenario more like the other ones.


    With the first scenario you will have a message exception generic response for unknown requests while the other one you can create as messages exceptions as you want to, but your VSI must match with the request. You should make sure your VS is in most efficient behaviour.


    I hope this help you.


  • 3.  Re: No found scenario response on VS
    Best Answer

    Posted May 23, 2016 11:42 AM

    Thanks Gustavo! as always you're of great help!

      Although your solution (I think) only works when the request has a different structure than expected, for instance it's expecting two parameters and only one would be received. I was looking for a not found scenario, where a request would have proper structure but the values entered were not considered.

    I think I've found the solution by first selecting the method but no selecting a scenario right away, that will give you access to a "non considered scenario", like this:

    no selected scenario.png

    if you select a scenario, like the first one:

    selected scenario.png

    you'll notice it's a different response! and the first one will show every time a scenario is not found.  Like Add operation with 1 and 7 as parameters scenario.  I've tried this using SOAP UI:

    not found scenario response.png


    Thank again Gustavo!


    Kind regards