0
votes

I have a test scenario in which I need similar kind of requests to be executed by the same thread and all threads should start at the same time.

  • If I use 1 thread group with multiple threads, threads execute random requests from the csv file. (How to make a request to be executed by a particular thread)
  • If I use multiple thread groups with 1 thread each and break my csv file to contain requests specific to each thread group, I guess it works. (but is this a correct approach) and though its said all thread groups start at the same time I can see that in logs start time for each thread group is different.

please suggest what would be the best approach to implement the required behavior

1
I will try to explain with an example, Lets say I have 10 requests out of which first 3 have everything same just 1 parameter is different and next 4 are almost same just 1 parameter different and same case for next 3 requests, I want first 3 requests to be executed by the same thread, similarly next 4 by the same thread and next 3 by same thread (logically same user should execute similar kind of request). How to achieve that? Hope I am clear this timeNewTechie

1 Answers

0
votes

If you want to get data from CSV and assure that a thread take a specific parameter, maybe you can use __CSVRead with its second parameter

Column number The column number in the file. 0 = first column, 1 = second etc. "next" - go to next line of file. *ALIAS - open a file and assign it to the alias

${__CSVRead(random.csv,${__threadNum})}

It will read from second column (start with 0) and every thread will read from next column