testform query
testform [global options] query [options] <filter-expression>The testform query command provides a built-in querying and filtering engine (similar to jq) to extract targeted slices of your managed test infrastructure directly from the state file.
Filter Expressions
Section titled “Filter Expressions”Query expressions allow filtering by tags, custom fields, milestones, or execution statuses:
# Find all test cases tagged with @smoketestform query '.resources[] | select(.scope == "testcase" and (.tags | contains(["smoke"])))'
# List all test runs where status is failedtestform query '.resources[] | select(.scope == "testrun" and .attributes.status == "failed")'
# Extract all issue URLs for milestone "Sprint 42"testform query '.resources[].instances[].attributes | select(.milestone == "Sprint 42") | .url'Command Options
Section titled “Command Options”| Option | Default | Description |
|---|---|---|
-json |
true |
Outputs results in JSON format. |
-raw |
false |
Emits raw string values without surrounding quotes. |
Real Execution Example
Section titled “Real Execution Example”$ testform query -raw '.resources[].instances[].attributes.url'https://github.com/my-org/web-app/issues/104https://github.com/my-org/web-app/issues/105https://github.com/my-org/web-app/issues/106Exit Codes
Section titled “Exit Codes”0: Query executed successfully.1: Invalid query expression or state parsing failure.