Skip to content

testform query

Ventana de terminal
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.

Query expressions allow filtering by tags, custom fields, milestones, or execution statuses:

Ventana de terminal
# Find all test cases tagged with @smoke
testform query '.resources[] | select(.scope == "testcase" and (.tags | contains(["smoke"])))'
# List all test runs where status is failed
testform 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'
Option Default Description
-json true Outputs results in JSON format.
-raw false Emits raw string values without surrounding quotes.
Ventana de terminal
$ testform query -raw '.resources[].instances[].attributes.url'
https://github.com/my-org/web-app/issues/104
https://github.com/my-org/web-app/issues/105
https://github.com/my-org/web-app/issues/106
  • 0: Query executed successfully.
  • 1: Invalid query expression or state parsing failure.