Service Virtualization

Expand all | Collapse all

Is there a way to setup a virtual service that will hit and record the live call when it does not match a specific transaction (non-meta) in the image?

Jump to Best Answer
  • 1.  Is there a way to setup a virtual service that will hit and record the live call when it does not match a specific transaction (non-meta) in the image?

    Posted 06-05-2017 01:40 PM

    I've been trying to setup a model that has the following behaviour:

    1. a message comes in.

    2. checks the image to see if there's a match.

    3. if no match call the live invocation, and record the live call in the image

    4. if there is a match, return the response from the image.

     

    I've noticed that with stand in mode, even if the request matches the meta, it will consider that a match and will not reach out to the live service for the new call.

    As with the documentation, Learning mode and Session Tracking will always pass through to the live service and update the image with the new requests.

     

    Has anyone attempted this configuration?

     

    Thakns,



  • 2.  Re: Is there a way to setup a virtual service that will hit and record the live call when it does not match a specific transaction (non-meta) in the image?
    Best Answer

    Posted 06-06-2017 09:46 AM

    Hi ivanzchan

     

    you can achieve this using learning mode,

     

    1.   Change the execution mode of the deployed Virtual service to learning in portal.
    2.   Add a live invocation step in the model and populate the required target fields
    3.   Add an assertion to go to live invocation step when the response is not configured in image

     

    Let me know if you have any questions.

     

    Thanks,

    Venkatesh



  • 3.  Re: Is there a way to setup a virtual service that will hit and record the live call when it does not match a specific transaction (non-meta) in the image?

    Posted 06-06-2017 10:18 AM

    Hello VenkateshSatturi

    Learning mode Automatically Heals the image, as in it updates the existing image and transactions with the live invocation calls:

     

    Execution Mode - DevTest Solutions - 10.1 - CA Technologies Documentation 

    "This mode is like Image Validation mode, but it automatically "heals" or corrects the virtual service to have the new or updated response from the live system. The next request that is passed into the virtual service automatically sees the new response that was "learned". Not only one system is being checked to learn, but both are, and the live system currently prevails."

     

    This will return the message from the live service instead of the virtual service

     

    To clarify, I want the virtual service to return a response if there is one (that is a non-meta transaction), otherwise get a response from the live service.



  • 4.  Re: Is there a way to setup a virtual service that will hit and record the live call when it does not match a specific transaction (non-meta) in the image?

    Posted 06-06-2017 10:27 AM

    hello ivanzchan

     

    yes, if you see 3. in my previous comment, live invocation is called only when there is no response returned by the image.

     

    Thanks.



  • 5.  Re: Is there a way to setup a virtual service that will hit and record the live call when it does not match a specific transaction (non-meta) in the image?

    Posted 06-06-2017 04:51 PM

    Thanks VenkateshSatturi

    Yes that achieves what I need.