terraform/internal/command/arguments
Martin Atkins b43ddd8ff6 terraform test: Experimental JUnit XML reporting
This adds an experimental new option -junit-xml=FILENAME for the
"terraform test" command. When specified, it writes a JUnit XML report to
the specified filename once the test run is complete, while continuing to
report test progress in the UI in the usual way.

This is only experimental for now because it remains to be seen if this
particular mapping to the JUnit XML schema is actually useful in real
software -- this format is woefully underdocumented and implemented
slightly differently by each consumer -- and so we might change this
significantly before stabilizing it, or remove it altogether if it turns
out that there's no useful mapping to JUnit XML here. Hopefully those who
are interested in JUnit XML reports will try this experiment against their
favorite JUnit XML-consuming software and report back whether the report
is presented in a helpful way.

It's a de-facto convention for JUnit XML to be reported separately to a
file, rather than replacing the normal test run output, since tools that
consume this format tend to present its results in a separate and less
prominent place than the output of the command itself. This option is
designed to follow that convention for consistency with various other
software that produces this format.

The implementation here is intentionally pretty minimal and simplistic just
as a starting point for gathering feedback. The main priority is that it
be easy to evolve this based on feedback and to remove it altogether if we
decide not to stabilize this at all. If this does become stabilized, it
might deserve being factored out into a separate package so that we can
minimize the amount of logic embedded directly inside the views package,
and it will certainly need some unit tests to represent what we've
committed to supporting in future versions.
2024-01-15 08:51:02 -08:00
..
apply.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
apply_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
default.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
extended.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
flags.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
output.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
output_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
plan.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
plan_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
refresh.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
refresh_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
show.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
show_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
test.go terraform test: Experimental JUnit XML reporting 2024-01-15 08:51:02 -08:00
test_test.go add missing copyright headers 2023-08-16 11:21:49 -07:00
types.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
validate.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
validate_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
view.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
view_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00