Monday, November 24, 2014

Jmeter :- Runtime throughput controlller

 Runtime throughput control in Jmeter load test
 We can control throughput in jmter during runtime using beanshell.server with following steps.

1.    Set following parameter in jmeter.properties
beanshell.server.port=9000
beanshell.server.file=D:/PEG/apache-jmeter-2.7/apache-jmeter-2.7/extras/startup.bsh
2.    Add initial throughput value in jmeter.properties
throughput=10
3.    Start jmeter from command line.
4.    While creating testplan, add Constant Throughput Timer  and  add “${__P(throughput)}”  in Target Throughput  textbox and  Create on BeanShell script (throughput.bsh) and add following code
setprop("throughput","100");
5.    Now start the load run.
6.    From new command window, change the throughput during runtime.
C:\Program Files\Java\jdk1.6.0\bin>java -jar "D:\PEG\apache-jmeter-2.7\apache-jmeter-2.7\lib\bshclient.jar" 127.0.0.1 9000 "throughput.bsh"
  
Note: This is working with jmeter 2.7

No comments:

Post a Comment