Skip to content

Defects

Defects in Qualflare track bugs and issues linked to failed test cases. The defects commands let you list and inspect defect records across your project.

qf defects list

List all defects in the project, with optional filters for severity and status.

Syntax

bash
qf defects list [flags]

Flags

FlagTypeDefaultDescription
--severitystring sliceFilter by severity. Accepts comma-separated values: critical, high, medium, low
--statusstring sliceFilter by status. Accepts comma-separated values: active, closed
--pageint0Page number for paginated results
--sort-bystringField name to sort results by
--sort-descboolfalseSort results in descending order
--api-keystringAPI key for authentication. Overrides QF_API_KEY environment variable

Examples

bash
# List all defects
qf defects list

# Filter by a single severity
qf defects list --severity critical

# Filter by multiple severities
qf defects list --severity critical,high

# Filter by status
qf defects list --status active

# Combine severity and status filters
qf defects list --severity high,medium --status active

# Sort by creation date, newest first
qf defects list --sort-by createdAt --sort-desc

# Paginate through results
qf defects list --page 2

Example Output

json
{
  "defects": [
    {
      "seq": 7,
      "title": "Login form fails with special characters",
      "severity": "high",
      "status": "active",
      "linkedCase": 142,
      "createdAt": "2026-03-20T14:22:00Z"
    }
  ]
}

qf defect get <seq>

Fetch full details for a single defect by its sequence number.

Syntax

bash
qf defect get <seq>

Arguments

ArgumentDescription
seqThe sequence number of the defect to retrieve

Flags

FlagTypeDefaultDescription
--api-keystringAPI key for authentication. Overrides QF_API_KEY environment variable

Examples

bash
# Get defect with sequence number 7
qf defect get 7

# Get defect and pipe to jq
qf defect get 12 | jq '.severity'

Example Output

json
{
  "seq": 7,
  "title": "Login form fails with special characters",
  "severity": "high",
  "status": "active",
  "linkedCase": 142,
  "createdAt": "2026-03-20T14:22:00Z"
}

Working with JSON Output

All defect commands output pretty-printed JSON to stdout, making them easy to pipe to jq for filtering and transformation.

bash
# Show only titles of critical defects
qf defects list --severity critical | jq '.defects[].title'

# Count defects by severity
qf defects list | jq '[.defects[].severity] | group_by(.) | map({severity: .[0], count: length})'

# Find all active high-severity defects and extract seq + title
qf defects list --severity high --status active | jq '.defects[] | {seq, title}'

# Get the sequence numbers of all critical defects
qf defects list --severity critical | jq '[.defects[].seq]'

# Check the severity of a specific defect
qf defect get 7 | jq '.severity'

See Also

  • Clusters — Group similar test failures to identify patterns and root causes
  • Milestones — List and inspect project milestones
  • Other Commands — Utility commands including validate and list-formats
  • Configuration — Environment variables and global flags reference