Skip to main content
Version: 3.0.0

Commands

This section documents the explicit, non-interactive subcommands.

All commands require a connection via --server and either --session or --login/--password.

Project Path or Keys

Many commands that operate on a project, test object version, or test cycle accept either:

  • The name of the project, version, or cycle
    (e.g. --project "My Project" --version "Release 1.0" --cycle "Cycle A")
  • The key of the project, version, or cycle
    (e.g. --project-key 102 --tov-key 1223 --cycle-key 5121)

If the keys are provided, they take precedence over the names. If no keys are provided, the CLI Reporter tries to resolve the names to keys by querying the TestBench server.

Common connection options

Every subcommand accepts these options:

OptionShortDescription
--server-sTestBench server address (hostname[:port] or full URL)
--loginLogin name for authentication
--passwordPassword for authentication
--sessionExisting session token (alternative to login/password)
--verifyEnable TLS certificate verification (flag, off by default)

These options can also be set on the main testbench-cli-reporter command and inherited by subcommands.


export-xml

Export an XML full report (zip).

testbench-cli-reporter export-xml -s HOST[:PORT] --login USER --password PASS \
--tov-key TOV --cycle-key CYCLE --uid itb-TT-1234 -o report.zip
OptionShortRequiredDefaultDescription
--project-pProject name
--version-vTest object version name
--cycle-yTest cycle name
--project-keyProject key (currently not relevant for XML export)
--tov-keyTest object version key
--cycle-keyTest cycle key
--uid-uReport root UID (test theme root). If omitted, exports the full tree
--filteringFilteringOptions payload as base64-encoded JSON (see FilteringOptions)
--output-oreport.zipOutput zip file path

You must provide either --project/--version[/--cycle] (by name) or --tov-key/--cycle-key (by key).


import-xml

Import an XML execution results zip back into TestBench.

Project, version, and cycle are determined from the XML content and don't need to be provided as options.

testbench-cli-reporter import-xml -s HOST[:PORT] --login USER --password PASS \
--input report.zip
OptionShortRequiredDefaultDescription
--input-iyesPath to the XML results zip file
--uid-uROOTReport root UID
--filteringFilteringOptions payload as base64-encoded JSON

export-json

Export a JSON full report (zip).

testbench-cli-reporter export-json -s HOST[:PORT] --login USER --password PASS \
--project-key PROJECT --tov-key TOV --cycle-key CYCLE \
--uid itb-TT-1234 -o json-report.zip
OptionShortRequiredDefaultDescription
--project-pProject name
--version-vTest object version name
--cycle-yTest cycle name
--project-keyProject key
--tov-keyTest object version key
--cycle-keyTest cycle key
--uid-uTree root UID
--filteringFilteringOptions payload as base64-encoded JSON
--output-ojson-report.zipOutput zip file path

You must either provide the keys for project and tov or cylce, or the names for project and version (and optionally cycle).


import-json

Import a JSON execution results zip back into TestBench.

Project, test object version, and test cycle are determined from the JSON report metadata.

testbench-cli-reporter import-json -s HOST[:PORT] --login USER --password PASS \
--input json-report.zip
OptionShortRequiredDefaultDescription
--input-iyesPath to the JSON results zip file
--uid-uReport root UID
--filteringFilteringOptions payload as base64-encoded JSON

export-csv

Export a CSV report zip.

testbench-cli-reporter export-csv -s HOST[:PORT] --login USER --password PASS \
--project-key PROJECT --tov-key TOV --cycle-key CYCLE --cycle-key CYCLE2 \
--uid itb-TT-1234 -o csv_report.zip
OptionShortRequiredDefaultDescription
--project-keyyesProject key
--tov-keyyesTest object version key
--cycle-keyTest cycle key (repeatable; omit to export without cycle scope)
--uid-uReport root UID
--output-ocsv_report.zipOutput zip file path

export-logs

Administrator helper: export TestBench server logs as a zip.

testbench-cli-reporter export-logs -s HOST[:PORT] --login USER --password PASS \
-o server_logs.zip
OptionShortRequiredDefaultDescription
--output-oserver_logs.zipOutput zip file path

gen-jwt

Generate a JWT based on the current session (TestBench 4.x+).

testbench-cli-reporter gen-jwt -s HOST[:PORT] --login USER --password PASS \
--permission ReadProjectHierarchy --permission ImportExecutionResults \
--project-key PROJECT --tov-key TOV --cycle-key CYCLE \
--subject my-service --expires 3600
OptionShortRequiredDefaultDescription
--permissionPermission to include (repeatable; accepts comma or | separated lists)
--project-keyProject key
--tov-keyTest object version key
--cycle-keyTest cycle key
--subjectSubject claim for the token
--expiresToken expiry in seconds

Run testbench-cli-reporter gen-jwt --help to see the full list of available permission names.