Service Virtualization

Expand all | Collapse all

Learn only the positive responses (with Response Code = 20x) in Learning mode

  • 1.  Learn only the positive responses (with Response Code = 20x) in Learning mode

    Posted 11-03-2017 02:41 PM

    Is there a way to learn only the positive response (with response code = 200 or 201) from Live Service if my VSM is deployed in Learning mode?
    In case of an error response (Response with Code 4xx or 5xx) from the Live Service, respond from the vsi. In case of this error response, I do not want the response added to the vsi in Learning mode.

     

    Will appreciate your help and/or feedback.

     

    Kishore



  • 2.  Re: Learn only the positive responses (with Response Code = 20x) in Learning mode

    Posted 11-07-2017 11:21 AM

    Disclaimer: I have never tried this so there is no guarantee that it will work.

     

    What about adding a Scripted Assertion into the Live Invocation Step?

    Move the Assertion above the Learning Mode assertion so it executes prior.

    Assertion psuedo-code:

    if the live response's, meta data, http response code starts with "2" or "20" AND 

    if the lisa_vse_execution_mode = "LEARNING"

    continue

    else

    branch to the Responder step.