Jmeter continue read multiple lines with multiple users

717 views
Skip to first unread message

andrew...@gmail.com

unread,
Aug 10, 2018, 2:23:26 AM8/10/18
to jmeter-plugins
I'm working on a load test using JMeter(4.0)
And I'm trying to insert some record by the CSV data.

The CSV data like:

    Ref1,Value1
    Ref1,Value2
    Ref1,Value3
    Ref1,Value4
    Ref1,Value5
    Ref2,Value1
    Ref2,Value2
    Ref2,Value3
    Ref2,Value4
    Ref2,Value5

My thread Group setting with 2 threads with one request with parameters:

    Name: Reference  Value:${Ref}
    Name: Value      Value:${Value}

Is it possible to let the first thread get the first 5 lines and the second user get the next 5 lines that fits in the request?

artem....@blazemeter.com

unread,
Aug 10, 2018, 4:12:54 AM8/10/18
to jmeter-plugins
Hi,

You can use Random CSV Data Set plugin. It will not split your CSV for the first 5 rows and the second 5 rows between 2 users, but it will split all 10 records between 2 users (unchecked checkbox 'Independent list per thread`)

https://www.blazemeter.com/blog/introducing-the-random-csv-data-set-config-plugin-on-jmeter

Thanks,
Artem

пятница, 10 августа 2018 г., 9:23:26 UTC+3 пользователь andrew...@gmail.com написал:

andrew...@gmail.com

unread,
Aug 10, 2018, 4:39:02 AM8/10/18
to jmeter-plugins
Hi Artem,

Thanks for your helping, I will take a try first and get back with the result later =D

Andrew

andrew...@gmail.com

unread,
Aug 10, 2018, 5:53:38 AM8/10/18
to jmeter-plugins
Hi Artem,

I've take some try on the plugin, and I found that I had done the same things using the CSV Data Set Config (I think). 
I made configuration as follow:

Variable Name(comma-delimited): Ref,Value

 And set the parameters in the request as follow:

  Name:        | Value:
  Reference  | ${Ref}
  Name:        | ${Value}

When the threads number set to two, it will only run with two lines in the CSV, and it run again from the beginning of the CSV if I add a Loop Controller in it.

 What I expected:

    Ref1,Value1 -> Loop cycle 1: thread 1
    Ref1,Value2 -> Loop cycle 2: thread 1
    Ref1,Value3 -> Loop cycle 3: thread 1
    Ref1,Value4 -> Loop cycle 4: thread 1
    Ref1,Value5 -> Loop cycle 5: thread 1
    Ref2,Value1 -> Loop cycle 1: thread 2
    Ref2,Value2 -> Loop cycle 2: thread 2
    Ref2,Value3 -> Loop cycle 3: thread 2
    Ref2,Value4 -> Loop cycle 4: thread 2
    Ref2,Value5 -> Loop cycle 5: thread 2

Or should I change the format of the source CSV (is it easier for me to achieve my expectation) ?

artem....@blazemeter.com

unread,
Aug 10, 2018, 8:30:27 AM8/10/18
to jmeter-plugins
There are no plugins that can split your csv file for first 5 records and second 5 records and pass then to 2 threads


Artem

пятница, 10 августа 2018 г., 12:53:38 UTC+3 пользователь andrew...@gmail.com написал:

andrew...@gmail.com

unread,
Aug 13, 2018, 4:42:29 AM8/13/18
to jmeter-plugins
Sad to know that. But still thanks for your helping =D

Andrew
Reply all
Reply to author
Forward
0 new messages