Skip to content

testform output

Ventana de terminal
testform [global options] output [options] [NAME]

The testform output command extracts and displays the values of output variables defined in your configuration and stored in the state ledger (testform.state).

When invoked with no additional arguments, it prints all outputs for the root module. An optional NAME argument can be provided to display only that specific output value.


Option Default Description
NAME (all) Name of a specific output variable to inspect.
-state=path testform.state Path to the state file to read.
-json false Emits output values in machine-readable JSON format.
-raw false Prints a single named output value without formatting or quotes (ideal for shell scripts).

Ventana de terminal
$ testform output
testcase_count = 42
testrun_id = "tr-20261027-01"
quality_gate_passed = true
Ventana de terminal
$ testform output testrun_id
"tr-20261027-01"

Ideal for passing values directly into environment variables or shell pipelines:

Ventana de terminal
$ RUN_ID=$(testform output -raw testrun_id)
$ echo "Testrun ID is: $RUN_ID"
Testrun ID is: tr-20261027-01
Ventana de terminal
$ testform output -json
{
"testcase_count": {
"sensitive": false,
"type": "number",
"value": 42
},
"testrun_id": {
"sensitive": false,
"type": "string",
"value": "tr-20261027-01"
},
"quality_gate_passed": {
"sensitive": false,
"type": "bool",
"value": true
}
}

  • 0: Outputs read and displayed successfully.
  • 1: State file was not found or the requested output variable does not exist.