performance testing - load test with varying number of threads in JMeter -
i have been exploring jmeter last couple of days. , try achieve following: trying create load test service such that, in first loop 'n' threads created , in second loop 'n+m' threads created , in third loop 'n+2m' threads, in fourth 'n+3m' threads , on. did find many solutions here , tried replicating them, somehow not working me. test plan created looks this:
step 1: add user defined variable called usercount = 0
step 2: create thread group. have used __intsum increment usercount 1 , storing result in usercount future reference.
ideally expecting here is, in first loop 1 thread created, in second loop 2 thread created , in third loop 3 threads created. in total there should 6 thread created. results show this:
not sure if missing silly or approach wrong. community appreciated. :)
i believe trying impossible. when jmeter starts thread group first time initializes number of threads.
what trying re-run same test 3 times different numbers of users each time. jmeter cannot re-run thread group once started, can re-run ("loop") thread in thread group. not possible add threads running thread group once ramp , threads initialized. (let me know if should try explain further).
if want 1 thread group populate run-time settings of thread group, must have 2 thread groups in test plan. @ test plan level, check off option "run thread groups sequentially."
with option, jmeter not initialize number of threads on second thread group until first 1 finishes. first thread group can set global property, , second thread group can reference in number of threads.
how set property in beanshell: (this in thread group 1)
props.put("threadgroup_2_num_users","15");
how reference value in thread group 2:
${__p(threadgroup_2_num_users)}
if not help, maybe try describe end goal. trying learn thing testing?
edit: perhaps using plugin package "stepping thread group" allow achieve scenario trying in single thread group. check out: http://jmeter-plugins.org/wiki/steppingthreadgroup/
Comments
Post a Comment