Run
Examples
porticol-cli run checkout.json
porticol-cli run checkout.json -e staging.json -r junit:report.xml
porticol-cli run --server https://cloud.porticol.app --collection Orders
Usage
porticol-cli run <collection-file|folder> [options]
porticol-cli run --server <url> --collection <id|name> [options]
Run options
| Option |
What it does |
-d, --data <file> |
a CSV or JSON dataset, one row per iteration |
-n, --iterations <n> |
how many times to run the collection |
--concurrency <n> |
requests in flight at once; --bail stops scheduling new ones after the first failure |
--delay <ms> |
the wait before each request but the first |
--timeout <ms> |
the request timeout where the collection sets none, 30000 by default |
--max-time <time> |
stop the whole run after this, as 30s or 10m |
--retry <n> |
try a request the transport could not send n more times |
--bail |
stop at the first failing request |
--schema <document> |
check every response against an OpenAPI document |
--fail-on-http-error |
a response of 5xx fails the run even with no assertion |
--open |
open the HTML report when it is written |
Sources
| Option |
What it does |
--server <url> |
a Porticol Cloud or Team Server, or PORTICOL_SERVER |
--token <token> |
an API token for it, or PORTICOL_TOKEN, or the file named by PORTICOL_TOKEN_FILE, or the one login kept |
--collection <id|name> |
the server's collection to run |
--folder <name|id> |
run this folder's requests alone |
-e, --environment <file|name> |
an environment file, or the name or id of one of the server's environments; file: and env: say which |
--remote |
run on the server rather than here (run only) |
Secrets
| Option |
What it does |
--secret <name=value> |
a secret variable, repeatable; above the environment file and the server's values, masked in every report |
--secret <name> |
the same, with the value read from the variable name |
--env-var <name> |
the same: the value is the process variable of that name |
--env-file <file> |
names to read from a .env file, one NAME=VALUE a line |
Project
porticol.toml beside the collection names environment, data, timeout and reports; a flag always wins over it
Reports
| Option |
What it does |
-r, --reporter <name[:path]> |
cli, junit, json or html, to standard output or to the file at path; repeat for several. perf reports as cli, json or html |
--junit <path> |
the same as -r junit:<path> |
--json <path> |
the same as -r json:<path> |
--html <path> |
the same as -r html:<path> |
Output
| Option |
What it does |
--color <auto|always|never> |
colour in the report; auto is a terminal, or CLICOLOR_FORCE in the environment |
--no-color |
the same as --color never |
-q, --quiet |
the totals alone: no header, no result lines, and no notices |
--silent |
nothing on standard output; file reports still written |
--no-progress |
the results at the end rather than as they finish |
--verbose |
every assertion and every console line |
Exit codes
| Code |
Meaning |
| 0 |
every request, assertion and threshold passed |
| 1 |
an assertion, a schema check or a threshold failed, a flow stopped, or the run was stopped with Ctrl-C |
| 2 |
a request could not be made |
| 3 |
the command line, a file, the configuration, the token or a variable is wrong |
| 4 |
the licence refused the run |
| 5 |
the head document breaks the base document, at the level --fail-on names |
| 6 |
the document has a lint finding of severity error |
See also