0
votes

I'm using JMeter for performance testing, with a CSV file as input. the CSV file has thousands of lines, each line is different and should represent a single request by a different user. the idea is to read the file line by line, group the thread number of request and send bulk requests. for instance, if the file has 1000 lines and I want to test 200 threads (users) I would like to call the first 200 csv lines, send in 200 requests at the same time, wait 1 second, then read the 201 to 401 lines, send again in 200 requests, etc.

for testing the configurations, i'm adding a 8 lines file, and the idea is to send it into two different bulks of 4 threads, each one with a single line, i.e., 1 request group with line1, line2, line3 and lin4. wait 2 seconds and then send line5,line6,line7,line8.

for Number of threads I'm using 4, ramp-up seconds i'm using 2 and the loop is 1. the result is the JMeter reads the entire file, sends the 1st line 4 times, then sends the 2nd line 4 times again, etc.

I've also tried use the Loop Control, without any result.

enter image description here

enter image description here

the message is build over the body part (not as parameter) enter image description here

Note: although it says transactionList, there is only one element there, so I think we do not need groovy script for this.

1

1 Answers

1
votes

Go for Synchronizing Timer, it acts as a rendezvous point for virtual user so JMeter will be "accumulating" the threads until their number reaches what you defined in the Synchronizing Timer and then release them at exactly the same moment.

In order to wait 1 second use Flow Control Action Sampler

Example test plan outline:

enter image description here

More information: Using the JMeter Synchronizing Timer