CLI Commands Reference
Section titled “CLI Commands Reference”Run tests, manage API keys, and view reports from your terminal.
zenitest auth
Section titled “zenitest auth”Saves your ZeniTest API key to your local machine:
zenitest auth <your_api_key>If you leave out the key, the CLI will ask you to type it in. Your key is stored at ~/.zenitest/config.json.
zenitest run
Section titled “zenitest run”Runs your test cases:
# Run all tests in the zenitests/ folderzenitest runCommon Flags
Section titled “Common Flags”| Option | Flag | Description | Default |
|---|---|---|---|
| Platform | --platform, -t |
Filter by web, ios, or android |
All platforms |
| Local URL | --local |
Run web tests against the local URL from config | — |
| Prod URL | --prod |
Run web tests against the production URL from config | ✓ (default) |
| Environment | --env, -e |
Target environment: local or prod |
prod |
| Custom API | --api-url |
Custom API server base URL | — |
| Browser | --browser |
Web browser: chromium, chrome, firefox, safari |
chromium |
| Mobile App | --bundle, -b |
Path to .ipa, .app, or .apk file |
From config |
| Device | --device |
Target device or simulator name | From config |
| Parallel | --parallel, -p |
Number of tests to run at the same time | 5 |
| Test File | --file, -f |
Run a specific test by filename | — |
| Custom Folder | --dir, -d |
Custom path to test files | zenitests |
Common Examples
Section titled “Common Examples”Run Web Tests
Section titled “Run Web Tests”Run against production URL (default):
zenitest run --platform web --prodRun against local development server:
zenitest run --platform web --localUse a specific browser:
zenitest run --platform web --browser firefoxRun Mobile Tests
Section titled “Run Mobile Tests”Run Android tests with an APK:
zenitest run --platform android --bundle ./build/app-debug.apkRun iOS tests with an IPA on a specific device:
zenitest run --platform ios --bundle ./build/Runner.ipa --device "iPhone 15 Pro"Run a Single Test
Section titled “Run a Single Test”By file path:
zenitest run zenitests/web/tc_login.yamlBy test ID (the CLI searches all platform folders):
zenitest run tc_loginzenitest report
Section titled “zenitest report”Shows the summary and step breakdown of a previous test run:
Formatted terminal output:
zenitest report <run_number>Machine-readable JSON output:
zenitest report <run_number> --jsonExample:
zenitest report 14zenitest report 14 --json