jenkinsci / jenkinsci/junit-plugin
Add hostname field support to JUnit plugin output
- Dominant language
- Java
- Stars
- 87
- Forks
- 351
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 2
Description
**Problem**
The JUnit plugin currently does not expose the hostname field from JUnit XML results, making it impossible to track which host/agent executed specific tests. This limitation affects downstream integrations that rely on the JUnit plugin for test data parsing.
**Impact**
- Cannot identify test execution environment in distributed builds
- Downstream plugins (splunk-devops-plugin, logstash) that depend on junit-plugin cannot access hostname information
- Reduces traceability and debugging capabilities in multi-agent environments
**Expected Behavior**
The hostname field from JUnit XML should be available in the plugin's parsed objects and accessible to other plugins that consume JUnit test data.
**Current Behavior**
Despite the hostname being present in the source JUnit XML files, it is not exposed in the plugin's data model.
**Environment**
JUnit plugin version: 1300.v03d9d8a_cf1fb_
Affected downstream plugins: splunk-devops-plugin, logstash
**Investigation**
Based on previous work, this should have been resolved:
PR #129: [github.com](https://github.com/jenkinsci/junit-plugin/pull/129)
PR #541: [github.com](https://github.com/jenkinsci/junit-plugin/pull/541)
Related issue: [issues.jenkins.io](https://issues.jenkins.io/browse/JENKINS-67942)
However, the hostname field is still not available in the parsed objects despite being present in the source XML.
**Steps to Reproduce**
1. Execute tests that generate JUnit XML with hostname attributes
2. Verify hostname is present in the raw XML
3. Check if hostname is accessible through JUnit plugin objects
4. Observe that hostname field is missing from parsed data
Contributor guide
Research direction
Start by reproducing the issue with JUnit XML containing hostname attributes, then inspect the plugin's parsed objects and compare the behavior with PR #129, PR #541, and JENKINS-67942. Done means hostname from the source XML is exposed in the data model and available to downstream consumers such as splunk-devops-plugin and logstash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100