Sunday, July 21, 2013

JMeter Think Time



We have 2 methods to put think time before function or step that we want to think time.
Method 1: Using BeanShell PreProcessor. We put it before sampler (ex: Http Request, FTP Request).

Code in BeanShell PreProcessor
import java.lang.Thread;

Thread.sleep(2000);// 2 seconds

Method 2: Using BSF Sampler. We put it before Controller(If Controller, Module Controller)
Code in BSF Sampler
var thinkTime = 2; //2 seconds

vars.put("thinkTime", thinkTime);
thinkTime

No comments:

Post a Comment