Running a subset of Jmeter Request | JMeter Forum
S
Shilpa Posted on 13/11/2019

I have a scenario:

Say, I want to load test for 100 users but only want 10% of those users to do a login journey and rest of the users to drop off the perfromance plan, how can I achieve this?

 


Basically, if 100 users hit the website, only 10 proceed to login and the rest abandon their journey.


A
Abhishek Puri Replied on 20/11/2019

Specify the variable maxUsers in Test Plan and set the desired value to it.

Now, make use of if Controller and use the below statement as it is.

${__BeanShell(threadNum = Integer.parseInt("${__threadNum}"); maxUsers = Integer.parseInt("${maxUsers}"); return (threadNum <= maxUsers*10/100);,)}