Create a block size in jmeter with csv config? Each thread should pickup specific set of values



  • How can we create a block size in JMeter with CSV config?

    I have 5 multiple users and one Bulkuser.csv file with 4 columns,

    The file has around 2000 values. I wish to create a block of 400 values for my 5threads[users]. 1st USER WILL USE 1st – 400 VALUES (Values in ROW 1-400)

    2nd USER WILL USE NEXT 5 VALUES (Values in ROW 401-800) and so on..

    How can we implement this? is there a beanshell pre-processor script for each data read and decide to read the specific file as per thread number?



  • As of JMeter 5.3 this functionality is not supported, the only stable option I can think of is splitting your Bulkuser.csv into 5 separate files like user1.csv, user2.csv, etc. and use __threadNum() and __CSVRead() functions combination for accessing the data like:

    ${__CSVRead(user${__threadNum}.csv,0)} - reads the value from column 1 from user1.csv file for 1st thread (for 2nd thread it will be user2.csv file, etc)
    ${__CSVRead(user${__threadNum}.csv,1)} - reads the value from column 2
    .....
    ${__CSVRead(user${__threadNum}.csv,next)} - proceeds to the next row


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 2
  • 2
  • 2