Skip to content

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.

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.

Terminal window
git clone https://github.com/abhay-1994/Orbittest_client.git
cd Orbittest_client
npm ci
npm run build:cli

This produces a single self-contained script, dist-cli/orbittest.cjs. Run it with Node:

Terminal window
node dist-cli/orbittest.cjs --help

To 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>]

Point it at your workspace file and pick what to run:

Terminal window
# Everything in the workspace, with the "staging" environment
orbittest run workspace.json --env staging
# One collection, one folder, with JUnit output for CI
orbittest run workspace.json -c "Orders API" --folder "Smoke" -e staging -r human,junit -o reports

In workspace mode, --env takes an environment name or id from the workspace. Without it, the workspace’s active environment is used.

You can also run a single collection file with an environment file, which suits a repository of exported collections:

Terminal window
orbittest run collections/orders.json -e environments/ci.json

The 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.

OptionWhat 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.
--insecureSkip TLS certificate verification (test environments only).
--bailStop 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, --helpShow help.
ReporterOutput
humanA readable summary printed to the terminal.
jsonorbittest-report.json in the --out folder: the full run report, including collection and folder on every request result.
junitorbittest-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.

CodeMeaning
0Every request and assertion passed.
1At least one assertion or request failed.
2Fatal 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.

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.

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 }
]
}
name: API tests
on: [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: reports

Pinning the clone to a release tag (--branch v1.3.0) keeps CI reproducible. Bump the tag when you want a newer runner.

The pulsar subcommands run Pulsar monitors headlessly, so monitoring continues while the app is closed:

Terminal window
orbittest pulsar list workspace.json # ● enabled ○ paused
orbittest pulsar run "Checkout API" --workspace workspace.json # run once, append results
orbittest pulsar schedule "Checkout API" --workspace workspace.json # print the Task Scheduler / cron command

pulsar 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