Currently my test structure is:
- User Defined Variable (Name:CAMPAIGN_ID, Value:100)
- Thread Group
- CSV Data Set Config (to read external txt file of user ids)
- HTTP Request
- Beanshell Assertion (use JSON path extractor to extract value of a field using CAMPAIGN_ID configured in UDV)
So my test runs fine with one CAMPAIGN_ID. Now i want to enhance this test and execute it for 10 Campaigns without updating it in User Defined Variable everytime. So i created a campaign.txt file as below
- Campaign1 100
- Campaign2 101
- Campaign3 103
Questions: 1. What is best approach to achieve this goal ? should i use beanshell prepocessor to read from txt file and store it in vars.put("Campaign1",100) and use for Each loop to loop through. 2. Can someone please help me with the new test structure and code sample ?
Any help is much appreciated !