开发者

Is it possible for a thread to select its own unique data from the csv file?

开发者 https://www.devze.com 2023-03-20 07:38 出处:网络
Is it possible for each thread select its own unique value from the csv file, say user1 has account number 202 and the next time it comes in the loop will thread user1 select 202? If not is there any

Is it possible for each thread select its own unique value from the csv file, say user1 has account number 202 and the next time it comes in the loop will thread user1 select 202? If not is there any other way out? I created a thread group and included a http request sampler(login) to read credential.csv to login each user and then another http request sampler to read from accounts.csv to process each unique user specific account. But now since开发者_如何学Go I made the thread run continuously for 5 mins the account numbers got mixed up? Can anyone suggest a way out....


If an account number must sync up with a specific credential, you should put them in the same CSV file. Thus, thread1 gets row1 data, thread3 gets rows3 data, etc.

Also, to clarify, a thread only exists for a single loop. Once you loop through your testplan, thread1 ends and becomes thread X


In your CSV Data set config select sharing mode to current thread instead of all thread.


If you want each thread to have its own set of values, then you will need to create a set of files, one for each thread.

For example test1.csv, test2.csv, ..., testn.csv. Use the filename test${__threadNum}.csv and set the "Sharing mode" to "Current thread".

0

精彩评论

暂无评论...
验证码 换一张
取 消