Skip to content

Other Commands

In addition to the collect command, the Qualflare CLI provides several utility commands for validation, format listing, and version information.

validate Command

Validate test result files without uploading them to the server. This is useful for checking if your test results are properly formatted before uploading.

Syntax

bash
qf <identifier> validate [files...] [flags]

Flags

FlagShortDescription
--format-fTest framework format to validate against (auto-detected if not specified)
--help-hHelp for validate command
--verbose-vEnable verbose output
--quiet-qSuppress non-error output

Usage Examples

bash
# Validate a single JUnit XML file
qf myapp validate results.xml

# Validate with specific format
qf myapp validate results.json --format playwright

# Validate multiple files
qf myapp validate test-results/*.xml

# Validate pytest results
qf myapp validate pytest-report.xml --format python

# Validate with verbose output
qf myapp validate results.json -v

Output

The validate command displays one line per file with the validation result:

bash
$ qf myapp validate results.xml

OK results.xml: valid (junit, 42 tests)

For invalid files, an error message is displayed:

bash
$ qf myapp validate invalid.xml

ERR invalid.xml: invalid - XML syntax error at line 15

Exit Codes

  • 0 - All files validated successfully
  • 1 - One or more files failed validation

list-formats Command

List all supported test result formats and frameworks. Use this command to see which testing frameworks are supported by the Qualflare CLI.

Syntax

bash
qf list-formats [flags]

Flags

FlagShortDescription
--category-cFilter by category (generic, unit, bdd, e2e, api, security)
--help-hHelp for list-formats command

Aliases

  • qf formats
  • qf lf

Usage Examples

bash
# List all supported formats
qf list-formats

# List only generic (JUnit-compatible) frameworks
qf list-formats --category generic

# List only unit testing frameworks
qf list-formats --category unit

# List only E2E/mobile frameworks
qf list-formats -c e2e

# List security testing tools
qf list-formats -c security

Sample Output

bash
$ qf list-formats

Generic (JUnit-compatible):
  - junit

Unit Testing:
  - python
  - golang
  - jest
  - mocha
  - rspec
  - phpunit
  - testng

BDD / Behavior-Driven:
  - cucumber
  - karate

UI / E2E / Mobile Testing:
  - playwright
  - cypress
  - selenium
  - testcafe
  - maestro
  - xctest
  - espresso

API Testing:
  - newman
  - k6

Security Testing:
  - zap
  - trivy
  - snyk
  - sonarqube

version Command

Display version information about the Qualflare CLI.

Syntax

bash
qf version [flags]

Flags

FlagShortDescription
--short-sPrint short version only
--help-hHelp for version command

Usage Examples

bash
# Display full version information
qf version

# Display short version
qf version --short

# Display short version (alternative)
qf version -s

Output Examples

Full version output:

bash
$ qf version

qf 0.1.8 (commit: 7ba8c3a, built: 2026-05-18T21:00:25Z, darwin/arm64, go1.25.10)

Short version output:

bash
$ qf version -s

qf 0.1.8

Output Fields

FieldDescription
VersionSemantic version of the CLI
CommitGit commit hash (first 7 characters)
BuiltBuild timestamp
OS/ArchOperating system and architecture
Go VersionGo runtime version used to build the CLI

Common Use Cases

Pre-commit Validation

Use validate in git pre-commit hooks to ensure test results are valid before committing:

bash
#!/bin/bash
# .git/hooks/pre-commit

# Validate test results before committing
qf myapp validate test-results/*.xml
if [ $? -ne 0 ]; then
  echo "Invalid test results detected. Please fix before committing."
  exit 1
fi

CI/CD Debugging

Use list-formats to verify supported frameworks in your CI environment:

bash
# In CI pipeline
echo "Checking supported formats..."
qf list-formats

Version Verification

Use version to verify the CLI installation in CI/CD pipelines:

bash
# Verify CLI is installed and working
qf version --short

Format Detection Testing

Use validate with verbose output to see which format was auto-detected:

bash
# Test format auto-detection
qf myapp validate unknown-results.json -v

See Also