📣 Requestly API Client – Free Forever & Open Source. A powerful alternative to Postman. Try now ->

Data-Driven API Testing with Requestly: Run Tests from CSV/JSON Files

Kanishk Rawat
Simplify API automation with Requestly’s Collection Runner. Run data-driven API tests using CSV or JSON files, inject dynamic variables, and analyze results effortlessly.

Running the same API test with different inputs shouldn’t mean rewriting requests again and again. That’s where data-driven testing comes in. With Requestly’s Collection Runner, you can easily run your APIs against multiple datasets directly from a CSV or JSON file.

Let’s see how it works.

What is Data-Driven API Testing?

Data-driven testing lets you use external data sources such as CSV or JSON files to run your API tests multiple times with different input values without modifying your requests each time.

It’s especially useful when:

  • You’re validating multiple user scenarios

  • You need to test APIs with varying payloads or parameters

  • You want automated regression coverage without duplication

In short: one test setup, many test cases.

Why Use Requestly’s Collection Runner for It?

Requestly’s Collection Runner was built for developers and testers who want a simpler, faster, and more flexible way to automate API workflows.
And now, with data-driven runs, you can:

  • Import CSV or JSON test data
  • Automatically inject values into request parameters, headers, or bodies
  • View consolidated results for each data row
  • Combine it with pre-request scripts and post-response tests for complete automation

You can test a full API suite in just a few clicks, with no external scripting required.

How It Works

Here’s a quick breakdown:

1. Create Your Collection

Organize your related API requests into a Collection inside the Requestly API Client.
Each request can include placeholders using variables like {{user_id}}, {{email}}, or {{amount}}.

2. Add Test Data (CSV or JSON)

Upload your dataset when running the collection.
For example, your users.csv might look like:

user_idemailamount
101[email protected]500
102[email protected]250
103[email protected]1000

Or, you can use a JSON file like:

				
					[
  { "user_id": 101, "email": "test1@email.com", "amount": 500 },
  { "user_id": 102, "email": "test2@email.com", "amount": 250 },
  { "user_id": 103, "email": "test2@email.com", "amount": 1000 }
]

				
			

3. Hit “Run Collection”

When you start the Collection Runner, select your data file.
Requestly automatically substitutes variable values for each row or JSON object, sending requests with dynamic data.

You can also add assertions in post-response scripts to validate expected outputs, like:

				
					rq.test("Status code is 200", () => rq.response.status === 200)
rq.test("Amount matches input", () => rq.response.json().amount === data.amount)

				
			

4. Analyze Results

After the run, Requestly displays a summary of all iterations including success and failure counts, response times, and test results for each dataset row.

This gives you a clear view of how your APIs behave across different inputs.

Example Use Cases

Here’s how teams are already using data-driven testing with Requestly:

  • QA engineers validating bulk user creation, order processing, or login APIs

  • Developers stress-testing APIs with hundreds of payloads before deployment

  • Product teams verifying API behavior for different environment configurations

Try It Out

You can try data-driven testing today in the Requestly Desktop App.

  1. Open your API Collection

  2. Click Run Collection

  3. Upload your CSV or JSON test data

  4. Watch your requests run automatically

It’s that simple.

Final Thoughts

APIs power everything, but robust testing powers reliable APIs.
With Requestly’s Collection Runner, you get the power of data-driven testing without the complexity.

Upload your dataset, hit Run, and make your testing effortless.

Written by
Kanishk Rawat
Kanishk Rawat, a tech enthusiast since childhood, has mastered programming through dedication. Whether solo or in a team, he thrives on challenges, crafting innovative solutions .

Related posts