Perf

Usage

porticol-cli perf <collection-file|folder> [options]
porticol-cli perf --server <url> --collection <id|name> [options]

Perf options

Option What it does
-u, --users <n> virtual users, 1 to 200 (default 10)
--duration <time> how long the load lasts, as 1500ms, 90s, 5m or 1h, from 1s to 1h (default 60s)
--ramp-up <time> the users start spread across this (default 0s)
--threshold <measure=n> the run fails unless this holds: p50, p90, p95, p99, max and mean in ms, and error_rate in percent, at most n; requests_per_second at least n. Repeatable
--timeout <ms> as for run
-d, --data <file> a CSV or JSON dataset, read round-robin by the users
--max-time <time> stop the load after this, as 30s or 10m
--retry <n> try a request the transport could not send n more times

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