jenkinsci / jenkinsci/junit-plugin

[JENKINS-38403] environment variables as input in post build configuration of junit test result

Open
#1,045 0 comments 0 reactions 0 assignees View on GitHub
component:junit-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
87
Forks
351
Avg merge
1d 19h
Merged PRs (30d)
2

Description

Hi

We want to run concurrent builds where each build generates junit test result xml files.

What we thought of doing was to create directory with $BUILD_NUMBER and use that directory for collecting test result.

however in Post Build action, Publish Junit report option in "Test report XMLs" variable names are not working.

Attached sample screenshot.

Let me know if any workaround available, i tried following things $BUILD_NUMBER, ${BUILD_NUMBER}, ${ENV,var="BUILD_NUMBER"} none of them working.

---
Originally reported by net2pratik4ever, imported from: environment variables as input in post build configuration of junit test result


  • status: Open
  • priority: Minor
  • component(s): junit-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-11-26

Raw content of original issue

Hi

We want to run concurrent builds where each build generates junit test result xml files.
What we thought of doing was to create directory with $BUILD_NUMBER and use that directory for collecting test result.
however in Post Build action, Publish Junit report option in "Test report XMLs" variable names are not working.

Attached sample screenshot.

Let me know if any workaround available, i tried following things $BUILD_NUMBER, ${BUILD_NUMBER}, ${ENV,var="BUILD_NUMBER"} none of them working.


  • environment: Jenkins ver. 2.7.1, JUnit Plugin (junit): 1.15

1 attachment

- [Screen Shot 2016-09-21 at 1.57.59 PM.png](https://issues.jenkins.io/secure/attachment/34034/Screen%20Shot%202016-09-21%20at%201.57.59%20PM.png)
> ![Screen Shot 2016-09-21 at 1.57.59 PM.png](https://issues.jenkins.io/secure/attachment/34034/Screen%20Shot%202016-09-21%20at%201.57.59%20PM.png)

Contributor guide

Open the contributing guide

Research direction

Start at the JUnit plugin's post-build configuration for the "Test report XMLs" field and reproduce the reported behavior with Jenkins 2.7.1 and JUnit plugin 1.15. Check how the field handles the attempted $BUILD_NUMBER forms; done means a concurrent build can use its environment-derived directory for collecting JUnit XML results.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.