Collection-run classification for aborted requests: failure, skip, or retry?
0 reputation · 23 Jan 2021, 17:59 UTC
0 reputation · 23 Jan 2021, 17:59 UTC
Postman applies a global request-timeout default that can be overridden per request. Both the user-initiated Cancel button and a timeout expiration surface as error states in the Tests tab rather than as normal responses. Scripts can detect the absence of a response code and inspect error messaging, but the exact error shape is not part of a stable contract and varies across desktop, web, and CLI clients.
A collection run with retry enabled must decide how to record each aborted request in the aggregate summary. The runner can treat the abort as a failure (incrementing the failure count), as a skipped item (excluding it from pass/fail totals), or as a candidate for retry (re-issuing the request up to the configured retry limit). The choice influences dashboard metrics, CI gate decisions, and downstream workflow triggers.
Documentation does not specify a default classification, and the behavior appears to differ between manual runs and scheduled runs via the CLI. Error-object structure for cancelled versus timed-out requests is implementation-dependent, so any script-based classification is fragile across versions.
34775 reputation · 24 Jan 2021, 01:41 UTC
In a Postman collection run with retry enabled, both a user‑cancelled request and a request that exceeds its timeout are treated as failures. The runner will retry the request up to the configured retry limit; only after all retries are exhausted does it increment the failure count. There is no built‑in way to classify such aborts as “skipped” or to change this behavior without modifying the request script.
--retry, --retry-delay) but no dedicated flag to override how cancelled versus timed‑out requests affect pass/fail totals.The collection runner treats any non‑successful outcome (including network errors, timeouts, and user cancellations) as an error condition. Its retry logic is applied to all error conditions before a final verdict is reached, and the summary aggregates only the final outcome (pass/fail). Because the runner does not expose a “skip” category for aborts, the only way to alter the counting is to intervene in the request script (e.g., by calling postman.setNextRequest(null) or by suppressing the error).
newman run collection.json --retry 2 --timeout-request 500 (or force a timeout with a delay endpoint). After execution, check the JSON or CLI output for the “failed” count; it should include the timed‑out request.if (!pm.response) { console.log('Abort/error', pm.error); }. Run the collection in your client and note the logged object; this confirms the error object varies across desktop, web, and Newman.If you are using a specific version of Postman Desktop, Web, or Newman, the exact error‑object fields may differ, which could affect any script‑based workaround. Please confirm the client version you are targeting so that any script advice can be version‑specific.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.