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 myapp defects list

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

Syntax

bash
qf myapp 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

Examples

bash
# List all defects
qf myapp defects list

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

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

# Filter by status
qf myapp defects list --status active

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

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

# Paginate through results
qf myapp 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 myapp defect get <seq>

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

Syntax

bash
qf myapp defect get <seq>

Arguments

ArgumentDescription
seqThe sequence number of the defect to retrieve

Examples

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

# Get defect and pipe to jq
qf myapp 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 myapp defects list --severity critical | jq '.defects[].title'

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

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

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

# Check the severity of a specific defect
qf myapp 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