在 Jmeter 中以突发模式进行负载测试 [英] Loadtesting in burst mode in Jmeter
本文介绍了在 Jmeter 中以突发模式进行负载测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在运行我的负载测试 1 小时,在测试之间我想要一个场景以 15 分钟的固定间隔运行 1 分钟.
I am running my load test for a duration of 1 hour,in between the test I want a scenario to run for a duration of 1 minutes at regular interval of 15 minutes.
在 jmeter 中,目前我能够模拟除突发模式之外的所有其他场景.如何将延迟保持 15 分钟并触发持续 1 分钟的请求?我如何实现突发的 TPS?目前我必须手动触发 jmeter 脚本.
In jmeter,currently I am able to simulate for all the others scenarios except for the burst mode. How do I keep the delay for 15 minutes and trigger the request for duration of 1 min? How do I achieve the TPS for the burst? Currently I have to manually trigger jmeter script.
推荐答案
我建议您执行以下操作:
I would suggest doing the following:
- 添加单独的线程组.
- 根据需要配置加速和线程数.
- 添加 Constant Timer,将线程延迟设置为 900 000(15 分钟)= 900 秒,1 秒 = 1000 毫秒)
- 添加一个Runtime Controller,将Runtime设置为60.
- 添加一个 Loop Controller,将 Loop Count 设置为 Forever.
- 将您的突发测试逻辑置于循环控制器下.
- 如果您需要在峰值期间定义每秒请求数,请使用 Constant Throughput定时器
- Add a separate Thread Group.
- Configure ramp-up and thread count as required.
- Add a Constant Timer, set Thread Delay to 900 000 (15 minutes = 900 seconds, 1 second = 1000 ms)
- Add a Runtime Controller, set Runtime to 60.
- Add a Loop Controller, set Loop Count to Forever.
- Place your burst test logic under the Loop Controller.
- If you need to define requests per second rate during spikes use Constant Throughput Timer
这篇关于在 Jmeter 中以突发模式进行负载测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文