简体   繁体   English

Jmeter 循环中两个循环计数之间的延迟 Controller

[英]Jmeter delay between two loop count in Loop Controller

I am trying to achieve below use case for load testing via jmeter我正在尝试通过 jmeter 实现以下负载测试用例

1. Search Product
2. Add to cart
3. Do payment

1 user with uid = 1 will perform above mentioned 3 steps every 5min for 1 hour. uid = 1 的 1 个用户将每 5 分钟执行上述 3 个步骤,持续 1 小时。 total request per user per hour. = 12(5 * 12 = 60) * 3(rpm) = 36(request per hour)

total users(threads) = 1000. total request per hour = 1000 * 36 = 36000总用户数(线程)= 1000。 total request per hour = 1000 * 36 = 36000

lets consider 3 request as a single set让我们将 3 个请求视为一个集合

I am looking for below things我在找下面的东西

  1. after every 5min 1 set should be executed每 5 分钟后执行 1 组
  2. delay between two sets should be of 5 min两组之间的延迟应为 5 分钟

can anyone please help me in achieving above scenario?谁能帮我实现上述情况?

I have tried with below jmeter tools我尝试使用以下 jmeter 工具

  1. thread group (thread = 1000, ramp up = 100 sec, loop count = 1)线程组(线程 = 1000,加速 = 100 秒,循环计数 = 1)

  2. loop controller( above 3 request with loop count = 12)循环控制器(以上 3 个请求,循环计数 = 12)

  3. constant timer = 300000 millisecond常量计时器 = 300000 毫秒

  4. thread group (thread = 1000, ramp up = 100 sec, loop count = 1)线程组(线程 = 1000,加速 = 100 秒,循环计数 = 1)

  5. loop controller( above 3 request with loop count = 12)循环控制器(以上 3 个请求,循环计数 = 12)

  6. constant throughput timer = 5 rpm恒定吞吐量计时器 = 5 rpm

  7. thread group (thread = 1000, ramp up = 100 sec, loop count = infinite, duration = 3600 sec)线程组(线程 = 1000,加速 = 100 秒,循环计数 = 无限,持续时间 = 3600 秒)

  8. above 3 request inside thread group以上 3 个请求在线程组内

  9. constant throughput timer = 5 rpm恒定吞吐量计时器 = 5 rpm

Also I have tried with random order controller我也试过随机顺序 controller

I am unable to simulate above scenario.我无法模拟上述情况。 What I am getting is first request is getting executed 1000 times, then delay, then second request is getting executed 1000 times, then delay then 3rd request is getting executed 1000 times.我得到的是第一个请求执行 1000 次,然后延迟,然后第二个请求执行 1000 次,然后延迟,然后第三个请求执行 1000 次。

Constant Timer adds a delay before each Sampler in its scope Constant Timer 在其scope中的每个采样器之前添加一个延迟

If you want to introduce a delay between 2 iterations add Flow Control Action sampler and define the desired delay there如果您想在 2 次迭代之间引入延迟,请添加Flow Control Action采样器并在那里定义所需的延迟

Additionally if you want all the users to finish the action - add a Synchronizing Timer and set the number of users to group by to be equal to the number of threads in the Thread Group.此外,如果您希望所有用户都完成操作 - 添加一个同步计时器并将要分组的用户数设置为等于线程组中的线程数。

More information on JMeter Timers concept: A Comprehensive Guide to Using JMeter Timers有关 JMeter 定时器概念的更多信息:使用 JMeter 定时器的综合指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM