Collection Runner & CLI
Run every request in a collection or folder sequentially — from the UI, or headlessly from the command line for CI/CD.
Collection Runner
Right-click a collection and choose Run Collection (or right-click a folder and choose Run Folder) to send every request in it, one after another. Each request runs the same way it would from its tab — pre-request script, send, test script — except nothing happens in the UI; instead a runner modal shows live results: method, name, status (or error), response time, and a passed/total tests badge for any test scripts.
Pre-request and test scripts share the same active environment and globals across the whole run, so a value extracted by pm.environment.set(...) (or pm.globals.set(...)) in one request's test script is available to later requests' pre-request scripts — useful for chains like "log in, then use the returned token for the rest of the requests in the collection". Click Stop to end the run after the current request finishes.
Data-driven runs (CSV/JSON)
Before clicking Start Run, optionally choose a .csv or .json data file:
- CSV — the first row is treated as headers; every other row becomes a data row, one column per header.
- JSON — must be an array of objects; each object becomes a data row.
When a data file is attached, the whole run repeats once per row. While a row is active, its columns take priority over environment/global variables for {{variable}} interpolation, and are also readable from scripts via pm.iterationData.get('columnName'). Each result in the runner modal is tagged with its iteration number when running with data.
CLI Runner
cli.js runs the same Collection Runner logic from the command line, without a browser — useful for CI/CD pipelines. It shares its core (lib/headless-runner.js) with the Monitors scheduler.
node cli.js <collection> [folder] [options]
<collection>— name of the collection to run (required)[folder]— name of a folder within that collection to run instead of the whole collection (optional)
Options:
--env <name>— use this environment (by name) instead of the active one--data <file>— a CSV/JSON data file for a data-driven run--data-dir <dir>— same asserver.js's--data-dir, defaults to./data
node cli.js "My API" --env Staging --data rows.csv
For each request, prints its method, name, status (or error), and elapsed time, plus PASS/FAIL lines for any test scripts, followed by a summary line. The process exits with code 1 if any request errored or returned a 4xx/5xx response, or if any test failed — 0 otherwise.