100 users will login to https://www.test.com/login Therefore, I created ThreadGroup and set necessary values. Created HTTP Request.
Then, all the users will navigate to SearchInventory https://www.test.com/ SearchInventory -> It will return 1000 items as HTTP response. Each item has Unique SKU Id. Using REGEX and BEAN Shell , I am able to fetch unique Ids from HTTP response and store them in array.
Then, I need to call below HTTP request and pass Unique Item Id to it https://www.test.com/ SearchInventory? itemId = ${itemId} For this, I use For Each loop successfully.
However, now the requirement is that all 100 users can not click on same Item. Each user will hit a unique HTTP request.
For example, user 1 will call HTTP request https://www.test.com/ SearchInventory? itemId = 12100,
User 2 will call https://www.test.com/ SearchInventory? itemId = 12101,
User 3 will call https://www.test.com/ SearchInventory? itemId = 12102 etc.
Like that till user 100
Is there a way to do such things in JMETER ?
In below image, I set Thread Group -> User to 100. In For each loop, I am getting 100 HTTP requests which are dynamically generated by fetching ItemId inside Array from previous HTTP Response. I want one user to hit only 1 request. Another user will call second HTTP requests. However, all thee requests are part of For Each loop because these are dynamically generated. Therefore, for each loop gets executed 100 times for each user.