在运行时更改JMeter中测试计划的线程数 [英] Change the thread count of test plan in JMeter, at run time

查看:460
本文介绍了在运行时更改JMeter中测试计划的线程数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在运行时更改JMeter测试计划的线程数。

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

我已经搜索了我的问题并找到了一个使用JMeter插件的建议解决方案。但是在这个解决方案中,我必须在运行测试计划之前安排线程组,这是我不想要的。我还发现另一个可能的解决方案,它改变了房产,但不影响测试计划运行时的行为。

I have Googled my problem and found a proposed solution to use JMeter plugins. But in this solution I would have to schedule the thread group before running the test plan, which I don't want. I also found another potential solution which changes the property, but doesn't affect test plan behavior at run time.

最后,我要做的是更改线程组中给出的线程数,并让它立即增加或减少当前运行的测试计划中的线程数。

Ultimately, what I am trying to do is change the thread number given in a thread group and have it immediately increase or decrease the number of threads in the current running test plan.

这可能吗?

推荐答案

简短的回答是:不,您无法在运行时动态更改线程数。每个线程计数值仅在首次编译测试计划时读取一次,并且在此点之后不再解析,因此它保持固定。

The short answer is: no, you cannot change the number of threads dynamically during runtime. Each thread count value is only read once when the test plan is first compiled and is not resolved again after this point, so it remains fixed.

这篇关于在运行时更改JMeter中测试计划的线程数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆