Michael Kunz
Michael Kunz

Reputation: 1

CSV Data Config not working correctly with my Thread-Loop

I'm new in Jmeter and have a problem with loading user data from csv file within a thread loop.

I created a little testsuite.

If I run my test I will get this output: - http request for user1 - http request for user2

I would have expected that only for user1 the request would be executed twice.
What am I doing wrong?

Regards,
Michael

Upvotes: 0

Views: 209

Answers (2)

Michael Kunz
Michael Kunz

Reputation: 1

what do I have to do if I want to execute a request for several users? With this example I can only execute requests for the first user in my CSV file. But my csv file has several users

I will do the following test:

for every user in my csv file do a http request (as often as specified by loop count in my thread group)

Example:

CSV has 10 users
Loop Count 5
Do for every of the 10 users the http request 5 times

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168162

If you want to achieve the described behavior you need to:

  1. Amend your Thread Group to have 2 threads and 1 loop

    enter image description here

  2. Amend Sharing Mode of your CSV Data Set Config to be Current Thread or ${__threadNum}

    enter image description here

Demo:

enter image description here

Upvotes: 1

Related Questions