#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
Postman

Postman Collection Runner

What is the Collection Runner?

The Collection Runner executes every request within a Collection (or a chosen folder) sequentially, without needing to click "Send" on each one individually.

Key Features

  • Running requests with different sets of data using a CSV or JSON data file (data-driven testing).
  • Choosing the number of iterations and the delay between requests.
  • Viewing a pass/fail summary of all assertions written in each request's Tests tab.

Why Testers Use It

The Collection Runner turns a set of individual manual requests into a lightweight, repeatable regression suite that can be run before every release.

Running a Data-Driven Login Test Step by Step

Imagine you want to check a login API with several username and password pairs, some valid and some invalid. Instead of creating one request per pair, write one request and feed it a data file.

  1. Create a CSV file where the first row holds column names. Each later row becomes one iteration.
  2. Use the column names as variables in the request, for example in the JSON body.
  3. Write assertions that compare the response with the expected result stored in the same row.
  4. Open the Runner from the collection's Run option, select the data file, preview the rows, and choose the iteration count and delay.
  5. Start the run and review each iteration's request, response and test result.
username,password,expected_status
alice@test.com,Correct#123,200
alice@test.com,wrongpass,401
,Correct#123,400

The request body uses the columns directly:

{
  "email": "{{username}}",
  "password": "{{password}}"
}

And the test script reads the expected value for the current row with pm.iterationData:

const expected = Number(pm.iterationData.get("expected_status"));
pm.test(`Status is ${expected}`, () => {
    pm.response.to.have.status(expected);
});

Controlling the Order of Requests

By default the Runner executes requests in the order they appear in the collection. You can change the flow from a script. For example, after a failed login there is no point calling the profile endpoint, so skip straight to cleanup:

if (pm.response.code !== 200) {
    pm.execution.setNextRequest("Cleanup");
}

Passing null stops the run after the current request. Older collections use postman.setNextRequest(), which behaves the same way. Use this sparingly; complicated jumps make suites hard to read.

Taking Runs into CI with Newman

The Runner is great on your desktop, but regression suites should also run automatically. Export the collection and environment, then run them with Newman, Postman's command-line runner:

npm install -g newman
newman run orders.postman_collection.json \
  -e qa.postman_environment.json \
  -d login-data.csv \
  -r cli,junit --reporter-junit-export results.xml

The JUnit report can be picked up by Jenkins, GitHub Actions or Azure Pipelines to show pass and fail counts on every build. The Postman CLI is another official option if your team works inside Postman's cloud workspace.

Mistakes That Make Runs Unreliable

  • Requests that depend on data created by a previous run, so the suite passes only once. Create and clean up test data within the run.
  • Forgetting to select the right environment before starting.
  • Assertions only on status codes; also check key fields in the response body.
  • Large files with mixed purposes; keep one data file per scenario so failures are easy to trace.

Ready to master real-world software testing?

Learn manual and automation testing hands-on with mentor-led sessions.

Explore Course