I want to use Postman to test the REST API of a project, and I'm trying to a generic request. For example:
I have a POST request that makes a research, the parameters of this research are in the body. How do I automate the request with a pre-request-script that modifies the body at each iteration?
Because I don't want to create a collection with 20 POST requests where only the body changes. I tried to use a while loop in pre-request-script or in test script but Postman executed the request only once. Then I tried to use the runner for calling the request 5 times, for example, and i wrote a script that modified a variable each time, but I think that global and environment variable are reset at each iteration of the runner.
Do you have any ideas?