Answer
Postman Collection Runner
The Collection Runner allows you to run all requests in a collection sequentially, view test results, and optionally use data files for data-driven testing.
How to Open Collection Runner
- ✓Click on a Collection in the sidebar
- ✓Click the Run button (▶) at the top right
- ✓Or: click the ... menu → Run collection
Collection Runner Options
| Option | Description |
|---|---|
| Iterations | How many times to run the collection (e.g., 3) |
| Delay | Wait time between requests (ms) |
| Data file | CSV or JSON file for data-driven testing |
| Save responses | Stores response data for review after run |
| Run order | Drag requests to reorder them |
Data-Driven Testing with CSV
users.csv:
CSV
username,password,expected_status
admin,admin123,200
user1,password1,200
invalid,wrongpass,401
In your test script:
JavaScript
pm.test("Status matches expected", function () {
pm.response.to.have.status(parseInt(pm.iterationData.get("expected_status")));
});
In Collection Runner:
- ✓Set Iterations to 3 (number of CSV rows)
- ✓Select users.csv as the data file
- ✓Click Run
Reading Results
The runner shows:
- ✓✅ Passed / ❌ Failed for each test in each request
- ✓Total pass rate
- ✓Response times per request
- ✓Export results as HTML report
Running via Newman (CLI)
Bash
# Run collection
newman run my-collection.json
# With environment
newman run my-collection.json -e staging.json
# With data file
newman run my-collection.json -d users.csv
# With HTML report
newman run my-collection.json --reporters html --reporter-html-export report.html
Use Case Example
Run a full login → create user → get user → update → delete flow, verifying each step with test assertions.
