Command-Line Runner (CLI) for CI
The orbittest command-line runner executes your OrbitTest Client requests and their Pre-Run and Post-Run scripts without the app. Use it in CI pipelines, pre-merge checks, scheduled jobs and local scripts. It writes human, JSON and JUnit reports and exits with a code your pipeline understands.
Get the CLI
Section titled “Get the CLI”The CLI is part of the open-source repository. It isn’t bundled with the desktop installer, so you build it once. You’ll need Node.js 22.12 or newer (CI uses Node 24) and Git.
git clone https://github.com/abhay-1994/Orbittest_client.gitcd Orbittest_clientnpm cinpm run build:cliThis produces a single self-contained script, dist-cli/orbittest.cjs. Run it with Node:
node dist-cli/orbittest.cjs --helpTo get an orbittest command on your PATH, run npm link inside the repository once. The examples below use the orbittest command; node path/to/dist-cli/orbittest.cjs works identically.
orbittest run <workspace.json> [options]orbittest run <collection.json> -e <environment.json> (Newman-style: loose files)orbittest pulsar list <workspace.json>orbittest pulsar run <id|name> --workspace <file> [--store <dir>] [--insecure]orbittest pulsar schedule <id|name> --workspace <file> [--store <dir>]Run a workspace
Section titled “Run a workspace”Point it at your workspace file and pick what to run:
# Everything in the workspace, with the "staging" environmentorbittest run workspace.json --env staging
# One collection, one folder, with JUnit output for CIorbittest run workspace.json -c "Orders API" --folder "Smoke" -e staging -r human,junit -o reportsIn workspace mode, --env takes an environment name or id from the workspace. Without it, the workspace’s active environment is used.
Run a collection file (Newman-style)
Section titled “Run a collection file (Newman-style)”You can also run a single collection file with an environment file, which suits a repository of exported collections:
orbittest run collections/orders.json -e environments/ci.jsonThe collection can be an OrbitTest or Postman v2.1 collection. The environment file can be an OrbitTest environment or variables export, the environments.json written by a Source Control push, or a Postman environment. In this mode -e must be a file path.
Options
Section titled “Options”| Option | What it does |
|---|---|
-c, --collection <name|id> | Only run this collection (default: all collections). |
--folder <name> | Only run requests in this folder. |
-e, --env <name|id|file> | The environment: a name or id (workspace mode) or a file path (collection mode). |
-d, --data <file.csv|json> | Data-driven run: one iteration per row. See Data-Driven Testing. |
-n, --iterations <n> | Repeat the run n times (ignored when --data is set). |
-r, --reporters <list> | Comma-separated: human, json, junit (default: human). |
-o, --out <dir> | Output folder for the JSON and JUnit reports (default: the current folder). |
--timeout <ms> | Override the per-request timeout. |
--insecure | Skip TLS certificate verification (test environments only). |
--bail | Stop at the first failure. |
-w, --workspace <file> | The workspace file, for the pulsar subcommands. |
--store <dir> | Pulsar run-results folder (default: the app’s data folder). |
-h, --help | Show help. |
Reports
Section titled “Reports”| Reporter | Output |
|---|---|
human | A readable summary printed to the terminal. |
json | orbittest-report.json in the --out folder: the full run report, including collection and folder on every request result. |
junit | orbittest-junit.xml in the --out folder, ready for GitHub, GitLab, Jenkins and most CI test dashboards. |
JUnit test identities. Each test’s classname is the request’s stable path, Collection/Folder/Request Name (for example Orders API/Smoke/Get order). The folder segment is omitted when the request isn’t in one, and iterations get a #N suffix. Because the path doesn’t change when a request’s method or host changes, CI dashboards keep an unbroken pass/fail history per test.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Every request and assertion passed. |
1 | At least one assertion or request failed. |
2 | Fatal error, such as an unreadable file, an unknown environment or bad arguments. |
Set ORBIT_DEBUG=1 to print a full stack trace on fatal errors.
Scripts and variables in the CLI
Section titled “Scripts and variables in the CLI”Pre-Run and Post-Run scripts run exactly as they do in the app, including ot.test, ot.expect and ot.data for data-driven rows. Values that scripts set (for example a captured token) carry forward to later requests within the run. CLI runs never write variables back to your workspace file, so a CI run can’t modify your collections.
Secrets in CI
Section titled “Secrets in CI”Secret variables are redacted from exports and Git pushes by design, so the workspace in your repository doesn’t contain real credentials. Supply them at run time instead: generate an environment file from your CI secret store, then use collection mode with -e:
{ "name": "ci", "variables": [ { "key": "baseUrl", "value": "https://staging.example.com", "enabled": true }, { "key": "token", "value": "<injected by CI>", "enabled": true } ]}GitHub Actions example
Section titled “GitHub Actions example”name: API testson: [push, pull_request]
jobs: api-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- uses: actions/setup-node@v4 with: node-version: 24
- name: Build the OrbitTest CLI (pinned to a release tag) env: ELECTRON_SKIP_BINARY_DOWNLOAD: "1" run: | git clone --depth 1 --branch v1.3.0 https://github.com/abhay-1994/Orbittest_client.git "$RUNNER_TEMP/orbittest" cd "$RUNNER_TEMP/orbittest" npm ci npm run build:cli
- name: Write the CI environment from secrets env: API_TOKEN: ${{ secrets.API_TOKEN }} run: | cat > "$RUNNER_TEMP/ci-env.json" <<EOF { "name": "ci", "variables": [ { "key": "baseUrl", "value": "https://staging.example.com", "enabled": true }, { "key": "token", "value": "$API_TOKEN", "enabled": true } ] } EOF
- name: Run API tests run: | node "$RUNNER_TEMP/orbittest/dist-cli/orbittest.cjs" run api/orders.json \ -e "$RUNNER_TEMP/ci-env.json" \ -r human,junit -o reports
- name: Upload reports if: always() uses: actions/upload-artifact@v4 with: name: api-test-reports path: reportsPinning the clone to a release tag (--branch v1.3.0) keeps CI reproducible. Bump the tag when you want a newer runner.
Always-on Pulsar monitors
Section titled “Always-on Pulsar monitors”The pulsar subcommands run Pulsar monitors headlessly, so monitoring continues while the app is closed:
orbittest pulsar list workspace.json # ● enabled ○ pausedorbittest pulsar run "Checkout API" --workspace workspace.json # run once, append resultsorbittest pulsar schedule "Checkout API" --workspace workspace.json # print the Task Scheduler / cron commandpulsar run exits 0 when the run is healthy and 1 otherwise. Results are appended to the same run store the app reads (or to --store <dir>), so headless runs appear in the Pulsar dashboard.
Related: Data-Driven Testing · Pulsar monitoring · Open Source & Contributing