My question is, I need to save a value from a response in a variable (this step is ok), but the problem is, we are using here a CSV input for this request on the collection runner.
When I do that I have a lot of responses (one for each line in the CSV input) using a single request.
Which type of βTestβ do I need to use to create a variable for each response for the CSV line entry? the way we know here we create an environment variable with a specific name, but if I run the inputs all the values I need in the response will go to this same variable and will replace the last value.
This is how we save the value in a variable here:
Is it possible to put a counter in the variable name or something like that to have different names for each CSV entry and save all the responses?
You could have something simple that using the pm.info.iteration function to add the current iteration to the variable name? Iβve added a +1 as the number is zero indexed.
This has been extremely helpful so thank you, however, I have a new problem. I have saved values in this way, in my case I have 48 ids set in the environment as id1-id48. In a separate collection I want to grab these ids in order 1-48 and place them in 48 get requests to test the json schema of the async responses. I have my other values for the request stored in a csv which I use to run my collection. How would I go about doing this?