I'm using jmeter to test my REST API for 10000 hit for which each http hit will store some data in DB. I have followed the below test plan
I'm running 10 threads in parallel with ramp up time 20 sec each and loop 1000 to achieve the same.
But the issue here is my threads are not taking unique data set. Whereas my backend HTTP URL expecting unique string for each http hit.
Now I have tried with the below approaches.
Single CSV data set config with 10000 unique values and all threads in thread groups are reading the same data.
Different CSV Data set for each threads and allocate the csv file with thread using filename${__threadNum}.csv
Using jmeter _RandomString method to generate random strings on runtime for each http hit, in http post body I'm passing like
{"tenantName":"${__RandomString(15,abcdefghijklmnofqrst1234567#@#%^&*,)}"}
- Using BeanShell preprocessor to call a java method and generate unique pattern all the time win HTTP Request sampler.
Now none of the above approaches works for me. While running the test plan after some point of time 2 threads are trying to use the same data and hit my HTTP url. And I'm getting conflict error from http response. My error count keeps increasing.
Now I really don't understand how these 2 treads trying to hit http with same data?
Can some one please explain the issue and help me to set the correct test plan configuration.
EDIT:
CSV data set config for all thread:
HTTP Request :
Adding test plan with CSV dataset:





sharing mode = all threadsshould be providing unique values per iteration. For example if there were two threads then thread 1 will read the first entry, thread 2 the second entry, then on the next iteration thread 1 will read the third entry, thread 2 the fourth entry and so on.