Skip to content

Output Values

Output values allow you to extract and export critical attributes from your managed test resources (such as issue numbers, URLs, and IDs) to make them easily consumable by CI/CD pipelines, Pull Request comments, or subsequent stages.


Outputs can be declared in main.yml, output.yml, or domain files:

output:
# 1. Provider-computed attribute
smoke_issue_number:
description: "Issue number of the generated Test Run in GitHub/GitLab"
value: "${testrun.suites/smoke.run.feature.@tr-1.issueNumber}"
# 2. Report web URL
report_web_url:
description: "Web link to attach to Pull Request comments"
value: "${testrun.suites/smoke.run.feature.@tr-1.url}"
# 3. Universal resource identifier
auth_testcase_id:
value: "${testcase.auth/login.case.feature.@tc-1.remoteId}"
# 4. Sensitive output
ci_token:
value: "${var.secret_token}"
sensitive: true

After running testform apply, output values are persisted in the state file and can be queried via CLI:

Ventana de terminal
$ testform output
auth_testcase_id = "local:25"
report_web_url = "https://github.com/my-org/qa-repo/issues/29"
smoke_issue_number = 29
Ventana de terminal
$ testform output -json
{
"smoke_issue_number": {
"sensitive": false,
"type": "number",
"value": 29
}
}
Ventana de terminal
$ ISSUE_ID=$(testform output smoke_issue_number -raw)
$ echo "Test run issue: $ISSUE_ID"