qf command reference
Every qf command in the Qualflare CLI, with flags, output and exit codes: validate result files without a token, list the formats and print the version.
Last updated
This page lists every command of the Qualflare CLI (qf) with its flags, output and exit codes: qf validate checks result files without uploading them and needs no login, qf list-formats lists the 31 formats, and qf version prints the installed version. Commands that read or upload data run as qf <identifier> <command>, with the token saved by qf login.
Command summary
| Command | Needs qf login | What it does |
|---|---|---|
qf login <identifier> [token] | No | Save an access token under a local identifier |
qf logout <identifier> | No | Remove a saved identifier and its token |
qf projects | No | List the saved identifiers |
qf <identifier> collect <files…> | Yes | Parse result files and upload them as a launch |
qf validate <files…> (also qf <identifier> validate) | No | Check result files without uploading them |
qf <identifier> suites list / suite get <seq> | Yes | List test suites, or get one |
qf <identifier> cases list / case get <seq> / case steps <seq> | Yes | List a suite's cases, or get one case or its steps |
qf <identifier> plans list / plan get <seq> / plan cases <seq> | Yes | List test plans, or get one plan or its cases |
qf <identifier> launches list / launch get <seq> | Yes | List launches, or get one |
qf <identifier> defects list / defect get <seq> | Yes | List defects, or get one |
qf <identifier> clusters list / cluster get <id> | Yes | List failure clusters, or get one |
qf <identifier> milestones list / milestone get <seq> | Yes | List milestones, or get one |
qf list-formats | No | List the formats --format accepts |
qf version | No | Print the installed version |
qf completion <shell> | No | Print a shell completion script for bash, zsh, fish or powershell |
Every command takes the global flags, and qf <command> --help prints its own help.
qf validate
qf validate checks that result files parse, without uploading them:
qf validate [files...] [flags]
qf <identifier> validate [files...] [flags]The first form needs no saved identifier and never calls the API; the second works too.
| Flag | Short | Description |
|---|---|---|
--format | -f | The format to validate against, a slug from qf list-formats. Auto-detected if not set. An unknown slug prints Error: unsupported format: <slug> |
--quiet | -q | Global flag. Hides the progress and OK lines; ERR lines still print |
Each argument is one file or an Allure results directory. Your shell expands unquoted globs. Unlike collect, validate does not read a directory of .json reports, so pass the files, for example qualflare-results/*.json.
qf validate results.xml
qf validate results.json --format playwright
qf validate test-results/*.xml
qf validate allure-results/
qf validate pytest-report.xml --format pythonValidating an Allure results directory qf ≥ 0.4.0 (requires qf 0.4.0 or later) uses the same detection as collect; an older qf reports failed to detect framework for the directory. See Allure results, and upgrade qf if qf list-formats doesn't list allure.
qf validate prints one line per file on stderr. A valid file:
$ qf validate results.xml
Validating 1 test result file(s)...
OK results.xml: valid (junit, 42 tests)An invalid file:
$ qf validate invalid.xml
Validating 1 test result file(s)...
ERR invalid.xml: invalid - parse error: failed to parse file content: <parser message>
Error: one or more files failed validationThe OK line names the format qf detected (or the one you passed) and the number of tests. An ERR line gives one of these reasons:
file does not existfailed to detect framework: …: no--formatwas given andqfcouldn't tell the formatunsupported framework: …: the format has no parserparse error: …: the file doesn't parse as that format
qf validate exits 0 when every file is valid, and 1 for an invalid file, an unknown --format or no file argument.
Check reports before you upload
Check a new reporter's output. Run your tests once, then run qf validate on the report. The OK line shows the format qf detected and the test count. If the format is wrong, pass the same --format to validate and collect.
pytest --junitxml=pytest-report.xml
qf validate pytest-report.xmlCheck reports in a job without a token. qf validate needs no saved identifier, so a CI job with no access token can still fail on a missing or unreadable report: this command exits 1 if the file is missing or doesn't parse.
qf validate test-results/junit.xmlqf list-formats
qf list-formats lists the formats --format accepts, in six groups:
qf list-formats [flags]Its aliases are qf formats and qf lf. --category (-c) shows one group: generic, unit, bdd, e2e, api or security. An unknown category lists no format and exits 0.
qf list-formats
qf list-formats --category unit
qf lf -c security$ qf list-formats
Generic (JUnit-compatible):
- junit
- ctrf
- allure
- qualflare-json
Unit Testing:
- python
- golang
- jest
- vitest
- mocha
- rspec
- phpunit
- testng
BDD / Behavior-Driven:
- cucumber
- karate
UI / E2E / Mobile Testing:
- detox
- playwright
- cypress
- selenium
- testcafe
- maestro
- xctest
- espresso
- webdriverio
- appium
- flutter
API Testing:
- newman
- k6
Security Testing:
- zap
- trivy
- snyk
- sonarqubeThe CLI supports 27 frameworks and 4 generic formats. Your installed version may list more; Supported frameworks gives each format's --format example.
qf version
qf version prints the installed version of the Qualflare CLI, and --short (-s) prints only the version number:
qf version [flags]$ qf version
qf 0.4.0 (commit: <commit>, built: <build date>, <os>/<arch>, <go version>)$ qf version -s
qf 0.4.0| Field | Description |
|---|---|
| Version | Semantic version of the CLI |
| Commit | Git commit hash (first 7 characters) |
| Built | Build timestamp |
| OS/Arch | Operating system and architecture |
| Go Version | Go runtime version used to build the CLI |
Print qf version --short at the start of a CI job so its log shows which qf ran. qf has no --version flag: qf --version fails with Error: unknown flag: --version.
Exit codes
qf validate exits 0 or 1; qf list-formats and qf version exit 0. Commands that call the API use the codes in collect's exit codes; see also read command errors.
Limits
qf validate reads each file up to 100 MB, the same cap as collect; a larger file prints ERR <file>: invalid - failed to detect framework: file <file> is too large (…).
Related
- Guides: Install the CLI · CI/CD Integration
- Reference: Upload results with qf collect · Query project data from the CLI · Configuration
- CLI/API: Access Tokens
Configuration and environment variables
Reference for Qualflare CLI settings: every QF_* environment variable and its default, the global flags, CI branch and commit detection, and which setting wins.
Query project data from the CLI
List and get suites, cases, steps, test plans, launches, defects, failure clusters and milestones with the Qualflare CLI, as JSON you can filter with jq.