Data Driven Testing in Postman

First I will create a POST request under collection3 as Register user


Request body:


“email”: “”,

“password”: “pistol”


Now let’s use variables at the global level and refer to them.

Now let’s create a new .csv file as follows and I’ll save it as Data1.csv

Then in postman I’ll run Collection3 through the collection runner. In the collection runner window I’ll select the Data1.csv file as follows.

Here if we want to preview a file, we can just click on the preview button and you will be able to see data which were contained in the csv file.

Once you click on the run collection3 button our collection will be run.

Here we can see data on request URL, request headers, request body, response headers and response body. Also you can notice that this has been run 2 times since we added 2 records.

2. How to get data from JSON file

Same as the above when we run the collection we can add a json file. I’ll add the Data2.json file.

Once you run this you will be able to achieve the same result as above.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store