container-structure-test icon indicating copy to clipboard operation
container-structure-test copied to clipboard

Bazel output results as junit.xml

Open vinnybod opened this issue 4 months ago • 2 comments

Most test rules in Bazel output the results in a junit.xml format. The only change needed for this is:

    fixed_args = [
        "--test-report $XML_OUTPUT_FILE",
        "--output junit",
    ]

But this uses the same test suite name for every test, which doesn't look great in most CI systems that parse junit.xml files. So it also passes the test target as the suite name, which also required me to modify the go code to accept a suite name.

vinnybod avatar Aug 15 '25 22:08 vinnybod

@vinnybod do you need help getting the tests green on this one?

alexeagle avatar Sep 17 '25 14:09 alexeagle

@alexeagle @loosebazooka do you think we can merge this?

vinnybod avatar Dec 03 '25 17:12 vinnybod

I noticed our test logs (stdout) don't display the errors anymore since this change.

Shouldn't this feature be opt-in via a setting? I understand CI systems usually parse junit reports, but that's not the case when running tests locally.

psalaberria002 avatar Dec 22 '25 11:12 psalaberria002