Skip to content

Plans Commands

Test plans in Qualflare organize test cases into structured execution plans, defining which cases should be run for a given release, milestone, or testing effort. The plans commands let you list plans and retrieve their case assignments from the command line.

qf plans list

List test plans in your project. Results are output as pretty-printed JSON to stdout.

Syntax

bash
qf plans list [flags]

Flags

FlagTypeDefaultDescription
--querystring""Filter plans by name or description
--pageint0Page number for paginated results
--sort-bystring""Field to sort results by (e.g., title, createdAt)
--sort-descboolfalseSort in descending order
--api-keystring""API key for authentication. Overrides QF_API_KEY environment variable.

Examples

bash
# List all test plans
qf plans list

# Search for a plan by name
qf plans list --query "regression"

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

# Paginate through results
qf plans list --page 2

Example Output

json
{
  "testPlans": [
    {
      "seq": 5,
      "title": "v2.4 Regression Suite",
      "description": "Full regression coverage for the v2.4 release",
      "caseCount": 64,
      "createdAt": "2026-03-01T08:00:00Z"
    },
    {
      "seq": 6,
      "title": "Smoke Tests - Production",
      "description": "Critical path smoke tests run after every production deploy",
      "caseCount": 12,
      "createdAt": "2026-03-05T10:00:00Z"
    }
  ]
}

qf plan get

Retrieve full details for a single test plan by its sequence number.

Syntax

bash
qf plan get <seq>

Arguments

ArgumentDescription
seqThe plan's sequence number (visible in the Qualflare UI and plans list output)

Flags

FlagTypeDefaultDescription
--api-keystring""API key for authentication. Overrides QF_API_KEY environment variable.

Examples

bash
# Get details for plan #5
qf plan get 5

Example Output

json
{
  "seq": 5,
  "title": "v2.4 Regression Suite",
  "description": "Full regression coverage for the v2.4 release",
  "caseCount": 64,
  "createdAt": "2026-03-01T08:00:00Z",
  "updatedAt": "2026-03-18T16:45:00Z"
}

qf plan cases

Retrieve the list of test cases assigned to a specific test plan.

Syntax

bash
qf plan cases <seq>

Arguments

ArgumentDescription
seqThe plan's sequence number

Flags

FlagTypeDefaultDescription
--api-keystring""API key for authentication. Overrides QF_API_KEY environment variable.

Examples

bash
# Get all cases in plan #5
qf plan cases 5

Example Output

json
[
  {
    "seq": 101,
    "title": "User can log in with valid credentials",
    "state": "passed",
    "priority": "critical",
    "suiteSeq": 5
  },
  {
    "seq": 115,
    "title": "Password reset email is sent",
    "state": "pending",
    "priority": "high",
    "suiteSeq": 5
  },
  {
    "seq": 203,
    "title": "Items persist in cart after session refresh",
    "state": "passed",
    "priority": "medium",
    "suiteSeq": 8
  }
]

Working with JSON Output

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

bash
# Count total plans
qf plans list | jq '.testPlans | length'

# Extract plan titles and case counts
qf plans list | jq '.testPlans[] | {seq, title, caseCount}'

# Find plans with more than 50 cases
qf plans list | jq '[.testPlans[] | select(.caseCount > 50)]'

# Count cases in plan #5 by state
qf plan cases 5 | jq 'group_by(.state) | map({state: .[0].state, count: length})'

# Get all failing cases in a plan
qf plan cases 5 | jq '[.[] | select(.state == "failed")] | .[].title'

# List all unique suites referenced by a plan
qf plan cases 5 | jq '[.[].suiteSeq] | unique'

See Also