Postman has capabilities to perform data-driven testing. you just have to prepare your test data in either CSV or JSON format.
For this post, I will be showing how you can use JSON file for your data-driven testing in postman. The JSON file below contains 3 sets of data and when you import your JSON or CSV in your postman it finds out how many iterations it has to run.

When you have your file ready , you can goto your postman tool and import this file as below:

After you click the run button, you will see the postman runner window, where you have to click on the “Select file” and import your test data JSON/CSV file

To preview your test data file you can click on preview button and verify if the data is imported properly

Sometimes you have to assert each iteration separately for validation. To do that you need to check for each iteration number and then inside your if the condition you need to add your validation.
Write below code under your “Tests” section.
//Assertion that should run for all iterations pm.test("Status code is 200", function () { pm.response.to.have.status(200); }); //Assertion that should run based on iteration number if (pm.info.iteration === 0) { //First iteration pm.test("Status code name has string", function () { pm.response.to.have.status("Created"); }); } else if(pm.info.iteration === 1) { //second iteration pm.test("Response time is less than 200ms", function () { pm.expect(pm.response.responseTime).to.be.below(200); }); }