[英]jmeter: How to set the thread count for the existing jmx file in java code?
I want to parameterize the thread count in the java code for the jmx
file which is envoked. 我想在Java代码中参数化所调用的
jmx
文件的线程数。
Please tell me how to do it? 请告诉我该怎么做?
My basic aim is to start with thread count of 10 and then increase it by 10 folds in the java code using loops. 我的基本目标是从线程数10开始,然后在Java代码中使用循环将其增加10倍。
${__P(threads,)}
${__P(threads,)}
)在.jmx文件中定义线程数 Depending on how you launch JMeter you can set the property value like: 根据启动JMeter的方式,可以设置属性值,例如:
jmeter -Jthreads=10
jmeter -Jthreads=10
threads=10
line to it threads=10
行 programmatically via JMeterUtils class 通过JMeterUtils类以编程方式
JMeterUtils.setProperty("threads", "10");
See Apache JMeter Properties Customization Guide for comprehensive information on JMeter Properties and ways of working with them. 有关JMeter属性及其使用方式的全面信息,请参见Apache JMeter属性自定义指南 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.