rules_java icon indicating copy to clipboard operation
rules_java copied to clipboard

Extending BazelTestRunner to Add Custom Metadata to JUnit XML

Open stefanp-stripe opened this issue 1 year ago • 1 comments

I've been working on extending the BazelTestRunner to add custom metadata (properties) to the JUnit XML generated by Stripe's Java tests, but I'm hitting a roadblock.

The most promising approach I've found involves using the TestPropertyExporter singleton instance, but I'm uncertain about how it's meant to be used. Additionally, when looking into the Bazel codebase, I noticed that the method testEmittedProperty() in TestSuiteModel.java seems related, but it isn't being called anywhere.

Any advice or alternative suggestions would be appreciated.

stefanp-stripe avatar Jan 08 '25 16:01 stefanp-stripe

slack thread, if helpful https://bazelbuild.slack.com/archives/CDCE4DFAP/p1736350275172469

stefanp-stripe avatar Jan 08 '25 16:01 stefanp-stripe