pause and resume jmeter execution

こ雲淡風輕ζ 提交于 2021-02-07 20:20:29

问题


I am looking for an option to pause and resume JMeter execution (single/multiple threads).

1. Pausing and Resuming through command line 
2. From the Jmeter UI
3. By coding in some language in a sampler of Jmeter
4. Using a JMeter plugin

Any of the above methods is fine.

Any thoughts and solutions are greatly appreciated.


回答1:


I would suggest going for Constant Throughput Timer

Despite word "constant" in its name, you can use i.e. JMeter Property via __P() function as "Target Throughput" value.

  1. Command-line: you can pass this property value via -J command-line argument like:

    • in JMeter define i.e. throughput property as: ${__P(throughput,)}
    • "tell" property value to JMeter as jmeter -Jthroughput=100 -n -t ....
  2. There is no way to do it from JMeter GUI without restarting the test. In general it is not recommended to run JMeter test in GUI mode.
  3. You can also amend the property value during the runtime

    • for example from Beanshell Test Elements using the following script:

      props.put("throughput", "300");
      
    • using Beanshell Server


I'm pretty much sure that you'll receive a number of suggestions to use Test Action sampler from not very competent people who didn't bother to familiarize themselves with documentation which states:

TargetCurrent Thread / All Threads (ignored for Pause)

So please don't waste your time on the Test Action sampler




回答2:


I suggest you follow the suggestion made by Oliver E. on user mailing list:

  • http://mail-archives.apache.org/mod_mbox/jmeter-user/201607.mbox/%3cCAK4Z_0AJ2c0_L==ByfgZ16FGgkyT5S9UnzboOaj3qc9PU94LSQ@mail.gmail.com%3e

Regarding your questions:

  • 1/ follow 1 + 3 as per Dmitri Answers
  • 2/ not possible yet :)
  • 3/ Follow mailing list answer
  • 4/ Not possible


来源:https://stackoverflow.com/questions/38499847/pause-and-resume-jmeter-execution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!