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/UpdateThinkTimeBody:
{
"vsiFile":"C:\\Program Files\\CA\\DevTest\\Projects\\Community_UpdateThinkTimeAPI\\VirtualServices\\Images\\Atm.vsi",
"thinkTimeMS":"1500"
}
Hope its helps
Original Message:
Sent: 12-07-2020 05:48 AM
From: Parthiban V
Subject: Need help in updating think time through lisa apis
@Doron Yerushalmi
Thanks for sharing the sample project. I couldn't understand the project very clearly.
Could you please explain it in detail.
Original Message:
Sent: 12-07-2020 04:25 AM
From: Doron Yerushalmi
Subject: Need help in updating think time through lisa apis
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
Original Message:
Sent: 12-04-2020 05:35 AM
From: Suman Kumar
Subject: Need help in updating think time through lisa apis
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
Original Message:
Sent: 12-03-2020 02:40 PM
From: KOUSTUBH WARTY
Subject: Need help in updating think time through lisa apis
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
Original Message:
Sent: 12-02-2020 12:20 AM
From: Parthiban V
Subject: Need help in updating think time through lisa apis
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.