Run a whole collection in the app: iterations, delays and stop on failure

Sending requests one by one is how you build a collection. Running it top to bottom is how you find out whether it still works. The collection runner does that from the app, with the same rules as Send.

What runs

The runner sends the HTTP and GraphQL requests of the collection or folder, one after another, each with:

  • collection and folder variables, inherited auth and timeouts;
  • the environment you pick and your local .env file;
  • pre-request and post-response scripts, with their pm.test results;
  • the request's assertions, plus the ones it inherits from its collection and folders.

gRPC, WebSocket and other interactive requests are listed as skipped. The runner sends saved requests, so save a request before running to include your latest edits.

The order

Tree order: inside each folder, its subfolders first, then its own requests. Name and arrange requests so that a login comes before the requests that need its token. For a collection like this:

Output
๐Ÿ“ Orders API
  ๐Ÿ“‚ Auth
    POST Log in
  ๐Ÿ“‚ Orders
    POST Create order
    GET  Get order
  GET Health

the run is: Log in, Create order, Get order, Health.

Values pass along

Variables set by a script (pm.environment.set, pm.variables.set) are passed to the next requests of the same iteration:

JavaScript
// "Log in", post-response
pm.environment.set('token', pm.response.json().access_token);

They're not written back to the environment, and each iteration starts fresh. That keeps runs repeatable: running twice doesn't depend on what the first run left behind.

The options

OptionWhat it does
EnvironmentThe one selected in the toolbar, or another for this run. Secret values are masked in results and exports.
IterationsRepeat the whole run, up to 100 times.
Delay between requestsWait up to 60 seconds between requests: for rate limits, or for eventually consistent reads.
Iteration dataA CSV (first line is the header) or a JSON array of objects. One iteration per row; the row's values are variables and pm.iterationData.
Stop on first failureEnd the run at the first request that fails, errors or has a failed test.
Save to Runs historyKeep the run in the Runs list (source app), next to runs saved from the CLI.

Stop ends a run before its next request.

Pass or fail

A request passes when all its tests pass, or, if it has none, when its status is below 400. Expand a row to see its tests, warnings, the script console and the response.

Results to share

After a run, download it as:

  • JSON, the same format as the CLI's --out;
  • JUnit XML, for test views in CI tools and test management systems;
  • HTML, a self-contained report you can attach to a ticket (see sharing an HTML report).

A saved run can be linked, or filed to Jira from the Runs list.

From the browser

In the web app, requests go through the Requestarium server, which reaches public addresses only. To run against localhost or a private network from the browser, keep Requestarium Desktop running or install the browser extension; see testing localhost from the web app. The desktop app sends requests from your computer.

The same run in CI

Terminal
requestarium run-collection "Orders API" --env Staging --iterations 3 --delay 200 --bail --junit results.xml