Extending BazelTestRunner to Add Custom Metadata to JUnit XML

Open
#261 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
java

Research direction

Start by tracing BazelTestRunner and the TestPropertyExporter singleton, then inspect TestSuiteModel.java and the unused testEmittedProperty() method. Determine how custom properties should flow into the JUnit XML and identify the relevant Java test coverage. Done means Stripe's Java test output includes the requested metadata and verifies it reliably.

Written by the indexing model from the issue text.

Description

P3

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.

Dominant language
Starlark
Stars
103
Forks
102
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bazelbuild/rules_java

All issues in bazelbuild/rules_java

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.