topcan5
topcan5

Reputation: 1707

jMeter: use separated .csv file for each each thread

I want to run 5 threads and each thread pulls in data from different .csv file. For example, thread 1 maps to data_1.csv... I do NOT want to create 5 Thread Groups.

Please help. Thank you!

Upvotes: 1

Views: 339

Answers (2)

Yoann
Yoann

Reputation: 66

To be able to open different csv files in the same test plan execution, you have to build a file name with the threadNum function.

According to your example you would have to set the filename to "data_${__threadNum}.csv" in the csv reader so the 5 threads will load your 5 files.

The files are shared upon their filenames so the sharing mode is not an issue.

Upvotes: 1

olyv
olyv

Reputation: 3817

According to usermanual By default, the file is only opened once, and each thread will use a different line from the file. You can change sharing mode but not open several different CSV files, i.e. one file for each thread.

Upd: on the other hand, if you don't have a lot of threads you can try this

Upvotes: 0

Related Questions