0
votes

I would like to call my API with different user id each time.

JMeter tree:

Thread Group
----While Controller
--------HttpRequest
--------CSV data set config

My CSV file:

111111111   
22222222   
33333333   
44444444  
55555555  
66666666  
77777777  
88888888  
99999999  
12121212

I want to run ONE user each SECOND, so in 10 second all 10 users used exactly.

3

3 Answers

1
votes

In Thread Group define 1000 as Number of threads and Ramp-Up Period as 100 seconds. (Loop Count 1)

It will execute CSV rows as you required

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

1
votes

Just make sure the thread numbers should be equal to the number of records in CSV so that 10 different threads login 10 different users in in 10 seconds.

0
votes

If you want to limit execution rate of JMeter's Samplers to 1 request per second - add Constant Throughput Timer as a child of the request you want to "slow down" and configure it like:

enter image description here

You can also consider 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

You can install Throughput Shaping Timer using JMeter Plugins Manager