Hi, newbie here!
I am not sure how to begin setting up my test (ex. Getting the number of VUs and its computation, how to indicate it in the load ramping executor, etc.)
SET UP:
The client has 50k users wherein 15k of it are Admins while the rest are Staffs. I will only be needing the 15k Admins for my test. But as per requirement, I will only be using 20% of that 15k. So I will be needing to perform a load test for a specific web transactions/scenarios for the 3k Admins only.
Example website transaction/scenario to load test is Workspace Selection (selecting a workspace). But note that on my js script, I included the endpoint requests for the Log in and Log out Scenario. So basically, to simulate a somewhat real user behavior, the scenarios in my single js script will include Log in → Go to Workspace Tab → Workspace Selection → Log Out. I also placed each covered API requests of these scenarios in a GROUP (total of 4 groups inside my script). As per requirement, I need to load test only the Workspace Selection scenario. The load test execution duration is 5 minutes.
-
I am using this formula: Number of VUS= (#OfSessionsInAMinute * AverageSessionDuration) / 60s
#OfSessionsInAMinute = number of sessions in a minute
AverageSessionDuration = how long each session in its duration in seconds
CONCERNS:
QUESTION # 1: How to get the AverageSessionDuration of Workspace Selection scenario?
- What I did is that I ran the script using per vu iteration executor with 1VU and 3k iterations (since I am testing 3k Admins performing the scenario). So that will allow me to get the average response time or average duration of that specific scenario. I believe there are two methods to know the average response time:
a) I placed a tags for each API requests that is covered in that specific scenario I am testing and
declared it in my threshold which will look like
http_req_duration{type:API}
. From there, I will thencheck the avg value of it in the displayed local execution results.
b) Since I placed it also in a group, I can get the group_duration which will look like 'group_duration{group:::Workspace Selection}'
and declared it also in my threshold. From there, I will then check the avg value of it in the displayed local execution results.
Am I doing it correctly? And what method should I use, a or b? The value of which is what I will be using in computing the number of VUs formula (AverageSessionDuration)
QUESTION #2: How to get the Number of VUs and apply it on my test.
- Let’s say I already have my AverageSessionDuration (ex. Workspace Selection scenario took 3s) , so this will give me
Number of VUs= (3000 sessions * 3s) / 60s = 150 VUs
So on my modified script for the actual load test execution…will it look like:
scenarios: {
Main: {
executor: 'ramping-vus',
stages: [
{ target: 150, duration: '1m' },
{ target: 150, duration: '3m' },
{ target: 0, duration: '1m' },
],
exec: 'main',
},
},
Are my computation and how I applied it on the set up of stages were correct?
Thank you so much.