The Collection Runner executes all requests in a collection sequentially. When scripts are present, the runner integrates them into the execution lifecycle.
For each request in the collection:
1. Fetch script chain (collection --> folders --> request)
2. Run pre-request scripts (top-down)
3. Check for pm.execution.skipRequest() -- skip HTTP if set
4. Apply request mutations from scripts
5. Send HTTP request (unless skipped)
6. Run test scripts (bottom-up)
7. Check for pm.execution.setNextRequest() -- override next request
8. Record test results and console output
9. Emit progress with per-request results
The runner's results table includes a Tests column showing pass/fail counts per request:
| Column | Content |
|---|---|
| Name | Request name |
| Status | HTTP status code, ERR, or SKIP |
| Time (ms) | Response time |
| Tests | passed/total (color-coded green/red) |
| Result | OK or error message |
A summary line shows aggregate totals:
Done: N/M requests OK | Tests: P/T passed | E error(s) | S skipped
Selecting a result row (the first row is selected automatically when the run finishes) shows a detail panel with:
- Response status code and timing
- Response headers
- Response body (first 2000 characters)
- A Test Results section (always present): per-assertion pass/fail, or a short message when the request has no test script
- Error message (if any)
The Export… button saves the results to CSV or JSON. The export includes name, method, status, timing, test counts, and result/error for each request.
The runner worker (RunnerWorker in collection_runner/worker.py) fetches
script chains via ScriptService.build_script_chain(request_id) and
executes them via ScriptEngine.run_pre_request_scripts() and
ScriptEngine.run_test_scripts().
Pre-request script mutations (URL, method, headers, body) are applied before the HTTP request is sent.
The runner's Environment dropdown lets you select an environment before starting a run. Selected environment variables are:
- Substituted into URLs, headers, and body text (
{{variable}}) - Passed to pre-request and test script contexts via
pm.environment.get(key)
Variable substitution uses the same {{key}} pattern as the main
send pipeline.
The runner shows a checklist of all requests in the collection. Uncheck individual requests to exclude them from the run. Use Select All / Deselect All buttons for bulk control.
Variables set by scripts in one request are currently scoped to that request's execution. Cross-request variable sharing in the runner is planned for a future release.
The pm.execution API controls request ordering in the runner:
pm.execution.setNextRequest(name)— jump to the named request after the current one finishes. Passnull/Noneto stop the runner entirely.pm.execution.skipRequest()— skip the current request's HTTP send. The request is recorded with status0and shown asSKIPin the results table.
Flow control is evaluated at the end of each request. The last
setNextRequest() call wins when multiple scripts set it.
// Test script: retry on failure
pm.test("Retry on 500", function() {
if (pm.response.code === 500) {
pm.execution.setNextRequest(pm.info.requestName);
}
});The runner supports data-driven iterations via CSV or JSON data files:
- Click Data File (CSV/JSON)… to load a CSV or JSON file.
- Each row becomes one iteration.
- Column names also auto-fill
{{var}}placeholders in the request URL, headers, and body (environment variables override a column on name clash). pm.iterationData.get(key)/pm.iteration_data.get(key)returns the value for the current row.- The Iterations spinner adjusts the iteration count.
username,password
alice,secret1
bob,secret2[
{"username": "alice", "password": "secret1"},
{"username": "bob", "password": "secret2"}
]The runner repeats the full request sequence once per data row. Progress bar and table show all iterations.
Script execution can be disabled globally in Settings → Scripting.
When disabled, pre-request and test scripts are skipped for both
single requests and collection runs. The setting is stored in
QSettings under scripting/enabled.
- Overview — execution order and inheritance
- JavaScript API — full JS pm reference
- Python API — full Python pm reference
- Security — sandbox and resource limits