nextest
nextest copied to clipboard
Add a way to set global properties in the JUnit output
- Define a way to set arbitrary global properties. For example, a
NEXTEST_JUNIT_PROPERTY_foo = barenvironment variable that becomes a propertyfoo = bar. - Make the root element a
<testsuite>, not a<testsuites>. Nest<testsuite>elements for each binary within the parent<testsuite>. This is allowed by the XSD https://llg.cubic.org/docs/junit/ but some parsers might not like it so we might need to be careful.
Unfortunately the nested <testsuite> approach might not work because most tooling can't handle it -- they expect the <testsuites>/<testsuite>/<testcase> pattern. For example, see https://github.com/sebastianbergmann/phpunit/issues/2964.
So the options are:
- Duplicate the global
<properties>across all<testsuite>instances. - Add
<properties>to the global<testsuites>, going against the XSD. - Put all test cases across all binaries within a single large
<testsuite>.