How to use JSR223 timer in JMeter

自作多情 提交于 2020-01-05 08:52:56

问题


I want to use JSR223 timer in JMeter and not manage to execute delay,

If I want to create thread delay of 30 seconds what should I write inside the script section ?


回答1:


Thread delay is created by calling sleep method which wait by given parameter in milliseconds, in your case:

sleep(30000);



回答2:


The correct way of creating a delay via script-based timer is using return keyword, the value should have Long data type and the delay is in milliseconds.

So creating a 30-seconds delay would be something like:

return 30000

More information: A Comprehensive Guide to Using JMeter Timers



来源:https://stackoverflow.com/questions/47496012/how-to-use-jsr223-timer-in-jmeter

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