5 / 65 · 14 API Testing Fundamentals · Postman Exploration← prev⊞ allnext →☰ Read as one page
1.5Collection Runner
The Collection Runner executes all requests in a collection sequentially, with test assertions.
Running a Collection
- Click "Runner" in Postman
- Select the collection
- Choose the environment
- Set iterations (run the entire collection N times)
- Upload a data file for data-driven testing
Data-Driven Testing
Create a CSV or JSON file with test data:
email,password,expected_status
valid@test.com,ValidPass123!,200
invalid@test.com,wrong,401
,ValidPass123!,400
valid@test.com,,400
In the request body, reference columns: {{email}}, {{password}}
In the test script:
pm.test(`Login with ${pm.iterationData.get("email")} returns ${pm.iterationData.get("expected_status")}`, () => {
pm.response.to.have.status(parseInt(pm.iterationData.get("expected_status")));
});