简体   繁体   中英

Automatic distributed reading of csv file in Jmeter distributed load testing?

My scenario is while doing distributed load testing through jmeter i want csv file should read in auto distributed manner. example if i have 100 users entry in csv data set config file and number of slave server is 10. so in normal scenario i have to keep csv file entry in arranged manner like

user1- to 10 at slave-1
user-11to20 at slave-2
.
.
.
user-91 to 100 at slave 3

so i want same csv file have entry of all 100 users should be placed at all slave and jmeter automatically read entry from these files and distribute it.

JMeter doesn't provide such functionality out of the box so the only option I can think of is reading required X lines with the given offset depending on the slave hostname or IP address somewhere in setUp Thread Group using JSR223 Sampler and Groovy language and writing this range of lines into a new file which will be used in the CSV Data Set Config.

Another possible solution would be going for HTTP Simple Table Server , it's READ endpoint allows removing the value after reading it so you will have unique data for all slaves.

You cannot do that at the moment but if you want a configuration in which each thread uses unique data even across slave machines, then you should use different Test Data files on different slave machine.

You have to place this Test Data file on each slave machine (with same location as on master). JMeter will use Test Data from the slave machine and not from the Master, so placing different data set on different machine will ensure uniqueness.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM