问题
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