Data-driven testing

Your API works. Now test it against every edge case.

Data-driven testing in Postman runs your collection once per row of test data, from CSV and JSON files or databases, so developers, QA teams, and coding agents find the exact input that fails.

Run it in the Collection Runner in the Postman app, or let your favorite coding agents like Claude Code, Codex, and Cursor run it for you with the Postman CLI.

Get started

Install for your agents

npm install -g postman-cli
Get started with
Example run with illustrative numbers: Claude Code in a terminal. Asked to test a discount change against every customer type before a pull request, it writes a CSV file with one row per customer type and runs the Checkout collection once per row with the Postman CLI. Four of five iterations pass. Iteration 4, the employee row with a coupon, fails because the total is 90.00 instead of 80.00. The agent finds that the new code applies the coupon in place of the staff discount, fixes it, and reruns the collection, which passes all 15 tests across 5 iterations, and links the run in Postman for reviewers.

Trusted by teams at

PayPal logo
Moneris logo
Autodesk logo
TotalEnergies logo
Cover Genius logo
Siemens logo
ZEISS logo

Install the Postman plugin in your coding agent

Install the Postman plugin and your agent gets data-driven testing workflows it can run on its own: writing a CSV or JSON file of edge cases, running a collection once per row, building a dataset with SQL views over your files and databases, and gating CI on the rows that fail.

Every command runs through the Postman CLI, the same tool your CI pipeline uses.

get the Postman plugin

Step 1
claude plugin marketplace add anthropics/claude-plugins-official
Step 2
claude plugin install postman@claude-plugins-official
See all Postman skills

Try these prompts

WHY POSTMAN

Data-driven testing in Postman

No new test code for each case. Keep your cases in a CSV file, a JSON file, or a dataset, and the collection you already have runs once per row.

  • Test data outside your test code

    Keep the cases in a CSV or JSON file and pass it to the run with -d. Each column becomes a variable your requests and scripts read, such as {{tier}}, so adding a case means adding a row.

  • One iteration per row

    The collection runs once for every row. When a test fails, the run names the iteration, so your agent knows which row to check. Signed-in runs of a cloud or linked collection upload to Postman with each test’s result and error details.

  • SQL views over files and databases

    A dataset turns CSV, JSON, and spreadsheet files, and MySQL, Postgres, SQL Server, or JDBC databases, into tables you query with SQL. A view picks the rows for one scenario and can join a file to a live database.

  • A dataset file that lives in Git

    Each dataset is a .dataset.yaml file that records where the data lives and the SQL for each view, without copying your rows into it. Changes go through review like the rest of your code.

  • The same data in runs, scripts, and mocks

    Use a view as iteration data, query the dataset with pm.datasets in pre-request and post-response scripts, including Postman CLI runs, or return its rows from a local mock.

  • Keep secrets out of the dataset file

    Database credentials can be Shared Vault references, or environment variables in CI, in place of plain text in the dataset file. Connect with a database account limited to read-only access.

Animated example with illustrative data: a Postman dataset named Checkout test data, open on its one_row_per_tier view. The data table lists five customers, one for each tier (guest, member, gold, employee, and tax_exempt), with their country and coupon code. Below the table, the view’s SQL query joins a customers table to a coupons table and returns one row per tier.

How it works

Step 1

Write the cases

Put one case per row in a CSV or JSON file, or a dataset view. Each column becomes a variable your requests and scripts read.

Step 2

Run once per row

Run the collection in the Collection Runner or with the Postman CLI. Each row runs as one iteration.

Step 3

Find the failing row

A failed test names its iteration, so you know which row to check.

Step 4

Gate CI

Run the same command in your pipeline and fail the build when any row fails.

Frequently asked questions

Trusted by over 50 million developers and 500,000 companies.

Install for your agents

npm install -g postman-cli
Get started with

Install for desktop

Sign up for free