#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 →
×

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 →

Iterating Over Data Files in Tests

Accessing Data Values in Scripts

When a run uses a data file, each iteration's values are available in scripts through pm.iterationData.get("variableName"), letting you reference the current row's data directly.

Tracking Iteration Progress

pm.info.iteration returns the current iteration number, which is useful for logging or for conditionally changing behavior on specific rows.

Validating Per-Iteration Results

TaskHow
Compare expected vs actualRead expected value from data file, compare to response
Skip a row conditionallyUse pm.execution.setNextRequest()
Log iteration detailsconsole.log with pm.info.iteration

Reviewing Results Across Iterations

The Runner summary shows pass/fail results for every iteration separately, making it easy to spot which specific data row caused a failure.

Beyond one-time runs, Postman can also keep testing your API automatically over time - let's look at monitors and alerts.

Ready to master Postman API Testing Course?

Join Uncodemy's hands-on training and build real-world API testing skills with expert mentors.

Explore Course