Service Virtualization

 View Only
  • 1.  Need help in updating think time through lisa apis

    Posted Dec 02, 2020 12:21 AM

    We are working on automation use cases to create stubs and insert new R-R pairs (new transactions) to the existing virtual service image using V3 apis (/lisa-virtualize-invoke/api/v3/vses/). There is an option to set think scale % while creating the stub/virtual service but there is no option to set think time through apis. Think scale is of no use without setting the think time as the default value for think time is 0ms

    We are looking at options to set think time through v3 or v2 apis.

    Can anyone help on this please.



  • 2.  RE: Need help in updating think time through lisa apis

    Posted Dec 03, 2020 01:07 AM
    Hi Parthiban,

    Think time is defined at a step level and hence i don't believe there is an option of updating it via API. Best way would be to update the vsi by editing it in editors like notepad++.

    Once you have the think time configured in services, using think scale you can use the desired combinations.

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 3.  RE: Need help in updating think time through lisa apis

    Broadcom Employee
    Posted Dec 03, 2020 02:40 PM
    Vaibhav is right.

    @Parthiban GV  How would you want to update the think time for steps if we had that option via APIs?​

    ------------------------------
    Head of Service Virtualization Product Management
    CA Technologies - A Broadcom Company
    ------------------------------



  • 4.  RE: Need help in updating think time through lisa apis

    Posted Dec 03, 2020 11:43 PM
    Thanks Vaibhav and Koustubh for your replies.

    @Koustubh Warty It would be helpful if we have an extra attribute ​called thinktime while creating the virtual service through which we can set a default value for all steps or separate api to update think time like create virtual service, update virtual service will also do.

    Currently we have the option to set think scale % through apis, but the default values for think time is set as 0ms. So think scale % is of no use here without setting think time spec.


  • 5.  RE: Need help in updating think time through lisa apis

    Posted Dec 04, 2020 05:35 AM
    Hi Koustubh,

    We are also usingv3 API for service virtualization automation framework and need similar features.

    I have a different approach to this problem statement:

    If we can supply meta-headers / arguments along with the R-R pairs like we supply headers in json R-R pairs and some DPH to handle these inputs, it would extremely enhance the capabilities of the v3 API by solving/applying:

    1.Meta-headers like response codes/ content-type changes required while performing chaos engineering
    2.Request data arguments match case rules
    3.Percentage distribution in case of multiple response(or dynamic response) for exact same response

    Thanks,
    Suman Kumar
    Wells Fargo



  • 6.  RE: Need help in updating think time through lisa apis

    Broadcom Employee
    Posted Dec 07, 2020 04:25 AM
      |   view attached
    Hi Parthiban,
    You can create your own API functionality to update think time.
    You can use the attached example as a baseline for your needs.

    Doron

    Attachment(s)

    zip
    UpdateThinkTimeAPI.zip   23 KB 1 version


  • 7.  RE: Need help in updating think time through lisa apis

    Posted Dec 07, 2020 05:48 AM
    @Doron Yerushalmi

    Thanks for sharing the sample project. I couldn't understand the project very clearly. 

    Could you please explain it in detail.


  • 8.  RE: Need help in updating think time through lisa apis

    Broadcom Employee
    Posted Dec 07, 2020 07:10 AM
    The idea was to expose a virtual service that simulates a REST API call, that takes as parameters the name of the VSI file and the thinking time.
    After inserting the RR files in the automation process into the VSI, you can call the virtual service that will update the thinking time in the VSI file and republish it.
    The Virtual Service is: UpdateThinkTime.vsm and UpdateThinkTime.vsi
    The sample vsi file to be changed: Atm.vsi
    Sample Rest call to invoke the VS: UpdateThinkTime.tst

    On the Listen step (under UpdateThinkTime.vsm), I added a script assertion "Get Param Script Assertion", that takes the REST arguments and save them as parameters.
    The script on step "Update Think Time script", updates the VSI file that you send as a parameter to the call with the think time spec for each methods (meta and instances).

    To call the VS :
    POST http://localhost:8001/myAPI/v1/UpdateThinkTime
    Body:
    {
    "vsiFile":"C:\\Program Files\\CA\\DevTest\\Projects\\Community_UpdateThinkTimeAPI\\VirtualServices\\Images\\Atm.vsi",
    "thinkTimeMS":"1500"
    }

    Hope its helps


  • 9.  RE: Need help in updating think time through lisa apis

    Posted Dec 07, 2020 07:16 AM
    Hi Parthiban,

    I haven't looked into the details of the folder shared by Doron. But my initial understanding is that it is a framework which will help you in automating the process of updating virtual service's thinktime in a virtual service and then that using that virtual service API for the same.

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------