How to evenly increase the number of users in 3 topic groups, while maintaining the proportion of requests between them?

I have 3 groups of topics in my testing plan. These stream groups must have a fixed request weight (for example, 1-50%, 2-40%, 3-10%). If I need to emulate a constant number of users, the solution in this post given by @ PMD UBIK-INGENIERIE works well if I set the number of cycles as a number (1, 10, 100 ect.). But the problem is that I check the "forever" box for Loop Counts, the proportion between the groups is broken.

Now I need to increase the number of users, keeping the proportion of requests between my 3 groups in order to perform a degree assessment. All 3 groups should send requests evenly, in this constant proportion of 50-40-10.

If I use the Stepping Thread Group, I can evenly increase the number of users in each of them, but I can not set the proportion of the request for them.

Could you tell me any idea how to do this?


UPD1.

My screenshots with settings: enter image description here

and

enter image description here

What's wrong?


UPD2. Last option (I put numbers manually for each group): (Thread Group1 - 50%):

enter image description here

+1
source share
1 answer

The idea is the same as in Response PMD UBIK-INGENIERI .

  • Set the USERS variable in custom variables or test plan variables (or you can pass it through the command line).
    Also set the variables:

    PERCENT1 to 0.5 PERCENT2 to 0.4 PERCENT3 to 0.1 
  • Add 3 incremental flow groups with:

"This group will start" set to

 ${__BeanShell(Math.round(${PERCENT1}*${USERS})} ${__BeanShell(Math.round(${PERCENT2}*${USERS})} ${__BeanShell(Math.round(${PERCENT3}*${USERS})} 

"Then run" to install:

 ${__BeanShell(Math.round(${PERCENT1}*${USERS}/10)} ${__BeanShell(Math.round(${PERCENT2}*${USERS}/10)} ${__BeanShell(Math.round(${PERCENT3}*${USERS}/10)} 

It will work if the value of the USERS variable can be divided by 100

+1
source

All Articles