Reputation: 157
I have a url. I have created 50 threads in jmeter. I want to post 50 different bodies to 50 different threads. The parameter that should be unique in each body is stored in an excel file, in 50 rows. For each body i want to use these 50 variables in excel sheet , one by one row wise. How can this be done?
Upvotes: 1
Views: 3508
Reputation: 168072
If your file is realy excel (i.e. xls or xlsx) you can read them using i.e. JSR223 Sampler and Apache POI library like described in the How to Implement Data Driven Testing in your JMeter Test guide.
You should get variables like:
var_1=foo
var_2=bar
var_3=baz
There are 2 ways of iterating the variables:
Using ForEach Controller
Using __V() and __threadNum() functions combination like ${__V(var_${__threadNum})}
However if you can control the Excel file it will be much easier to save it as .csv and use CSV Data Set Config
Upvotes: 3