Service Virtualization

Expand all | Collapse all

How can i change execution mode based on request parameters which i pass and Is there any way to dynamically create multiple requests and responses in learning mode

  • 1.  How can i change execution mode based on request parameters which i pass and Is there any way to dynamically create multiple requests and responses in learning mode

    Posted Aug 18, 2017 09:21 AM

    How can i change execution mode based on request parameters which i pass...

    sample url:

    https://domain/uid=1236

    Like if i send a request parameter uid: 1236 but, in my vsi i have uid: 4567 which doesn't match with what i have sent. So, it should dynamically go into learning mode so that it can learn from live. If parameters matches then it should be in default mode(Efficient Mode).

     

    And i also while in learning mode instead of replacing existing one can it create multiple responses and multiple requests.

     

    Is there any way to dynamically create multiple requests and responses in learning mode.



  • 2.  Re: How can i change execution mode based on request parameters which i pass and Is there any way to dynamically create multiple requests and responses in learning mode
    Best Answer

    Posted Aug 21, 2017 04:39 PM

    Hello Vinay,

     

    I believe you will need to customize your VSM to verify the incoming request and then decide what to do next.

    To change the Execution Mode you can use REST invoke API, the VSEManager and it should be possible to add some code to the VSM and set the new execution mode as well - I don't have details on this last one.

    VSE Manager documentation: VSE Manager Command - Manage Virtual Service Environments - DevTest Solutions - 10.1 - CA Technologies Documentation 

    REST Invoke API: Change the Execution Mode Using the REST Invoke API - DevTest Solutions - 10.1 - CA Technologies Documentation 

     

    When running in learning mode the SI will be updated when its response is different from what the live system is returning.

    In learning mode, if you send the request parameter uid: 1236 and in the SI you have the uid: 4567, which doesn't match, it will go to live and learn that new transaction.

    If 4567 is already in the SI and the responses from live and SI are the same, it won't learn the new transaction. If the responses are different, then the service image will be updated.

     

    In Image Validation mode, you can select which transactions you want to update the VSI. It doesn't update the service image automatically.

    This mode allows a live comparison between the responses that the VSE provides and a corresponding live system and, where differences exist, patches or heals the service image to keep in sync with the live system.

     

    Hope it helps.

    Heloisa