JMeter CSV 运行 一一

JMeter CSV run one by one

我想每次都用 不同的 用户 ID 调用我的 API。

JMeter 树:

线程组
----控制器
--------HttpRequest
--------CSV数据集配置

我的 CSV 文件:

111111111   
22222222   
33333333   
44444444  
55555555  
66666666  
77777777  
88888888  
99999999  
12121212

我想 运行 每秒钟一个用户, 所以在 10 秒内所有 10 个用户都使用了。

Thread Group 中定义 1000 为 Number of threadsRamp-Up Period100 秒。 (循环计数 1)

它将根据您的需要执行 CSV 行

Ramp-up Period How long JMeter should take to get all the threads started. If there are 10 threads and a ramp-up time of 100 seconds, then each thread will begin 10 seconds after the previous thread started

如果你想限制 JMeter Samplers to 1 request per second - add Constant Throughput Timer 的执行速率作为你想要 "slow down" 的请求的子级,并像这样配置它:

你也可以考虑Throughput Shaping Timer which is more precise when it comes to shorter execution time frames and it has some more features like defining load patterns or connecting with the Concurrency Thread Group

您可以使用 JMeter Plugins Manager

安装吞吐量整形计时器

只需确保线程数应等于 CSV 中的记录数,以便 10 个不同的线程在 10 秒内登录 10 个不同的用户。