I created ‘assetID’ as a variable in the URL. How can I use the Pre-Request Script to make this iterate thru a list of integers as variable ‘assetID’?
For example… I want assetID = 10, 11, 12, 13, 14, 15.
There are a number of ways that it could be done, both with and without the Runner.
Using a datafile (Either a JSON or CSV) which holds the values you would like to iterate over would be easier without needing to create any scripts.
The column name in the CSV or the object key in the JSON file will be the same name as your {{assetID}} placeholder variable. Each iteration would use a new value in the request URL and replace the variable.
I’ve attached the doc from the learning center but i’m happy to go through any follow up questions you may have: