Introduction

In this article, we will look at how to perform Data Driven Testing using Postman Tool.

Pre-requisite

Data driven Testing

Data Driven Testing is a Test design and execution strategy where the test scripts read test data from data sources (file or database) such as ADO objects, ODBC sources, CSV files, etc. rather than using hardcoded values

Advantages of Data-Driven Testing

Steps to perform Data Driven Testing in postman

[{
    "name": "hugo",
    "job": "leader"
},
{
    "name": "mike",
    "job": "developer"
},
{
    "name": "elis",
    "job": "designer"
}
]

Select the JSON test data file. (screenshot below),

Postman Data Driven Testing

How to refer,

Note
This step applies when you read data from CSV file or excel as well.

{
    "name": "{{name}}",
    "job": "{{job}}"
}

If your test data contains any numeric value then refer the key of the testdata as a variable without any quotes

Example

{
    "name": "{{name}}",
    "job": "{{job}}"
    "age":{{age}}
}

Screenshot on how to refer the test key variable

Postman Data Driven Testing

Screenshot of preview

Postman Data Driven Testing

Postman Data Driven Testing

Data Driven Tests Using CSV file

Example of CSV file,

name,email
test,qaengineer
testertwo,developer

Postman Data Driven Testing

Screenshot of the CSV file preview,

Postman Data Driven Testing

Screenshot of run,

Postman Data Driven Testing

Summary

Hope this article will help you in performing Data Driven Testing using Postman Tool.

Thanks............