在测试过程中同步 JMeter 中的线程
Synchronizing threads in JMeter in middle of test
如何在JMeter中同步线程?我想让所有线程都登录 Web 应用程序(加速),然后等待并同时执行循环 "compute all"。
如果我使用 Synchronizing Timer
(超时 > 0),那么每一步都会同步 50 个线程。
如何让他们到达POST - click on company
然后等待?
我可以做一些 BeanShell 计时器来等待给定的日期(但我不是 BeanShell 专家)。有没有办法以更 JMeter 的方式做到这一点?
在help中有解释:
To apply a timer to a single sampler, add the timer as a child element of the sampler. The timer will be applied before the sampler is executed. To apply a timer after a sampler, either add it to the next sampler, or add it as the child of a Test Action Sampler.
因此,要在 POST - click on company
应用同步,您需要将同步计时器 置于 POST - click on company
之下。这样所有线程将同时 start POST - click on company
:
POST - click on company <-- all threads will synch up here
|-Synchronizing timer
Loop - computer all
如果您希望它们 运行 POST - click on company
不同步,并在循环 之前同步 ,则在 [= 之后添加 Test Action Sampler
12=],并在其下放置Synchronizing timer:
POST - click on company
Test Action Sampler
|-Synchronizing timer
Loop - computer all <-- all threads will synch up before loop
如何在JMeter中同步线程?我想让所有线程都登录 Web 应用程序(加速),然后等待并同时执行循环 "compute all"。
如果我使用 Synchronizing Timer
(超时 > 0),那么每一步都会同步 50 个线程。
如何让他们到达POST - click on company
然后等待?
我可以做一些 BeanShell 计时器来等待给定的日期(但我不是 BeanShell 专家)。有没有办法以更 JMeter 的方式做到这一点?
在help中有解释:
To apply a timer to a single sampler, add the timer as a child element of the sampler. The timer will be applied before the sampler is executed. To apply a timer after a sampler, either add it to the next sampler, or add it as the child of a Test Action Sampler.
因此,要在 POST - click on company
应用同步,您需要将同步计时器 置于 POST - click on company
之下。这样所有线程将同时 start POST - click on company
:
POST - click on company <-- all threads will synch up here
|-Synchronizing timer
Loop - computer all
如果您希望它们 运行 POST - click on company
不同步,并在循环 之前同步 ,则在 [= 之后添加 Test Action Sampler
12=],并在其下放置Synchronizing timer:
POST - click on company
Test Action Sampler
|-Synchronizing timer
Loop - computer all <-- all threads will synch up before loop