CLI Reference ​
Complete reference for TestBeats command-line interface and programmatic usage.
Commands ​
testbeats publish ​
Publish test results to configured targets.
testbeats init ​
Initialize a new TestBeats configuration file.
testbeats manual sync ​
Sync manual test cases from Gherkin feature files to TestBeats Portal.
Installation Methods ​
NPX (Recommended) ​
bash
npx testbeats@latest [command]Download Executable ​
bash
curl https://raw.githubusercontent.com/test-results-reporter/testbeats/main/scripts/download-latest.sh | bash
./testbeats-[os] [command]NPM Package ​
bash
npm install testbeats -g
testbeats [command]Programmatic Usage ​
bash
npm install testbeatsjavascript
const { publish, defineConfig } = require('testbeats');
const config = defineConfig({
// configuration
});
publish(config);Root-level options ​
These options apply to every command (publish, init, manual sync):
| Option | Description | Default |
|---|---|---|
-h, --help | Display help information | - |
-v, --version | Display CLI version | - |
-l, --logLevel | Log level (TRACE, DEBUG, VERBOSE, INFO, WARN, ERROR, SILENT) | INFO |
publish command options ​
Flags such as --config, --api-key, --slack, --junit, --ci-info, and --chart-test-summary apply only to testbeats publish. They are not global. See the full publish command reference for tables and examples.
Environment Variables ​
| Variable | Description | Example |
|---|---|---|
TEST_BEATS_API_KEY | TestBeats API key | api-key |
TEST_BEATS_PROJECT | TestBeats project name | my-project |
TEST_BEATS_RUN | TestBeats run name | my-run |
Quick Reference ​
Publish to Slack ​
bash
testbeats publish --slack "webhook-url" --junit "results/*.xml"Publish with Configuration ​
bash
testbeats publish -c testbeats.config.jsonMultiple Targets ​
bash
testbeats publish --slack "url1" --teams "url2" --junit "results/*.xml"With Extensions ​
bash
testbeats publish --ci-info --chart-test-summary --slack "url" --junit "results/*.xml"See Also ​
- Configuration Reference - Complete configuration schema
- Targets Reference - Communication platforms
- Extensions Reference - Available extensions
