CLI
cactus-cli <command> <project> [arguments] [flags]<project> is the folder containing opencollection.yml. Flags can go anywhere after the command.
Exit codes
Section titled “Exit codes”0 |
Passed |
1 |
A check, status or step failed |
2 |
Couldn’t run |
Sends every request in the project, or in one folder, in tree order.
cactus-cli run <project> [folder] [-e <env>] [--as <critter>] [--json]cactus-cli run .cactus-cli run . orders -e stagingcactus-cli run . --as viewer --json > results.jsonSends one request. The body goes to stdout; the status line and warnings go to stderr.
cactus-cli send <project> <request> [-e <env>] [--as <critter>]cactus-cli send . users/me.yml --as admin | jq .emailThe exit code reflects the request’s checks.
Runs one flow, or every flow of every critter.
cactus-cli flow <project> <critter> <flow> [flags]cactus-cli flow <project> --all [flags]| Flag | |
|---|---|
--all |
Every flow of every critter |
-e, --env <NAME> |
Environment |
--json |
JSON output |
--junit <FILE> |
Also write a JUnit XML report |
--var <NAME=VALUE> |
Answer a prompt or pick; repeatable |
cactus-cli flow . admin smoke -e stagingcactus-cli flow . --all --junit flows.xmlcactus-cli flow . support refund --var email=jo@example.comPrompts
Section titled “Prompts”| Situation | Behaviour |
|---|---|
--var given |
Answers the field with that name |
| Terminal | Asks for any unanswered fields; secret input is hidden |
| No terminal | Uses the field’s default; with no default, the step fails |
pick |
Answered by a --var matching a value the item would set |
display with pause |
Doesn’t wait without a terminal |
open |
Prints the URL; opens a browser only at a terminal |
notify |
Prints to stderr |
import
Section titled “import”cactus-cli import <project> <file>Postman v2.x, OpenAPI 3, Swagger 2. See Importing.
Common flags
Section titled “Common flags”| Flag | |
|---|---|
-e, --env <NAME> |
Use this environment instead of the active one |
--as <CRITTER> |
Send as this critter (run, send) |
Environment variables
Section titled “Environment variables”CACTUS_PASSWORD |
Vault password |
CACTUS_TOTP_CODE |
Authenticator code |
Output
Section titled “Output”admin › smoke✓ 200 184ms 1. Login auth/login.yml✗ 500 92ms 2. Create order orders/create.yml res.status: expected eq 201, got 500- - - 3. Get order orders/get.yml skipped
0/1 flow passed