I have a REST API based testCase. Within the testCase, i am using Setup Script (groovy) to increment a property called 'id' s value by 1. The test steps within the test case use this id in their json request. This id has to be unique for each test case. The issue is when I run this test case using loadUI with 2 VU (Virtual Users), loadUI starts two test cases with the same 'id'. I have to keep the 'id' as unique for the test steps within the test case to work. Please advise.
Maybe you can look at using a groovy script data source that can house the ID property and increment appropriately? Or using the set-up groovy script to populate a grid datasource that is shared among the VU's in the load test. That might help solve this problem. I've done similar in the past when I needed unique data during a load test.
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!