Jmeter: While Controller, CSV Data Set, If Condition (x users, n data)

Viewed 30

How do run a while controller, for X number users for N number of data set?

CSV Data set

columnA,columnB

A,1001

B,1002

C,1003

D,1004

Test plan
¦__Group Thread — (User Count –> 4)
    ¦_While Controller (${__javaScript("${columnA}" != "",)})
        ¦_CSV Data Set (Recycle on EOF=False &, Stop thread on EOF= False)
            ¦_If condition (${columnA} != ”EOF”)
                ¦_Http request 1    
                ¦_Http request 2

I want to run for 4 users, 4 times each. i.e. 16 times * 2 http request.

But, my thread is running only 1 iteration per user.

How do I configure/plan my thread so that the Group thread runs for 4 users for all the data set?

1 Answers

With the default Sharing Mode of the CSV Data Set Config JMeter will read the next value from the CSV file with each user on each iteration.

You're making the things way too complicated, you can simplify your test to:

  1. Thread Group:

    enter image description here

  2. CSV Data Set Config:

    enter image description here

Demo:

enter image description here

Related