I want to create 100 driver entries in my DB, for which I am using postman and automating the creation using JSON and json expects a unique driver_number every-time a POST request goes. I can do that same using JMeter but wanted to explore postman.
Attaching the screenshots for reference:
Pre-request Script:
Tests:
Initially tried to create small number of drivers. Once I go for Run Collection option and after running it, it creates just a single driver where loop needs for run for multiple times. And multiple drivers needs to be created.
Here is the screenshot for Run collection:
Can anyone suggest me regarding where am I doing wrong.
Thanks for the suggestion.
There is probably two things to check.
If the CSV file is syntactically valid the iteration will automatically be picked by postman.
--UPDATED--
Seems the 'counter' environment variable is not being re-mapped once it is incremented. Try adding pm.environment.set("counter",counter)
after the counter++
statement, this should update the environment variable once the increment is done.