-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promote JUnit output 'terraform test' feature from experimental status #36228
base: main
Are you sure you want to change the base?
Conversation
0179ead
to
33c3051
Compare
website/docs/cli/commands/test.mdx
Outdated
| Test file | `<testsuite>` | There will be as many `<testsuite>` elements as there are test files. The tests in a `<testsuite>` are summarized in its attributes: `name` is the file name; `tests` is total count of tests; `skipped` is a count of skipped tests; `failures` is a count of failed tests, `errors` is a count of errored tests. | | ||
| Run block | `<testcase>` | Any `<testcase>` elements will be nested inside a parental `<testsuite>` element corresponding to the file that contains the run block. | | ||
| Test failure error | `<failure>` | If a `<testcase>` fails then it will contain a `<failure>` element that contains a message about a test failure. | | ||
| ??? | `<system-err>` | ??? | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To do!
This will hopefully be made clear during work on a related PR that refactors and adds test coverage to the feature
<failure message="Test run failed"></failure> | ||
<system-err><![CDATA[ | ||
Error: Test assertion failed | ||
|
||
on example_2.tftest.hcl line 21: | ||
(source code not available) | ||
|
||
local.false did not match expected value | ||
]]></system-err> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely to change after refactoring prior to promoting the feature
This PR promotes the JUnit output of the
terraform test
command out of experimental status.The PR is blocked by a separate PR to refactor the code prior to promotion.
TODO
Target Release
1.11.x
Draft CHANGELOG entry
NEW FEATURES
terraform test
: Theterraform test
command's feature to output a JUnit XML test result report is now generally available. To use this feature, pass the flag-junit-xml=FILENAME
to theterraform test
command.