Change the thread count of test plan in JMeter, at run time

前端 未结 7 514
名媛妹妹
名媛妹妹 2020-12-10 14:09

I want to change the number of threads for a JMeter test plan at runtime.

I have Googled my problem and found a proposed solution to use JMeter plugins. But in this

7条回答
  •  猫巷女王i
    2020-12-10 15:03

    You can set/change the number of threads at runtime using command line option...

    you can use function calls, or variable references to User Parameters (which in turn could be functions), or variable references to variables set up by functions earlier in the test. There's more than one way to do it.

    Suppose you want to be able to vary the number of threads in a test plan. Choose a suitable property name, say group1.threads. Replace the thread count in the GUI (or the JMX, if you're feeling brave!) with the following function call:

    Please set below property in JMeter thread group as below ${__property(group1.threads)}

    Then, when starting JMeter, define the property on the command line:

    jmeter -Jgroup1.threads=10

提交回复
热议问题