jenkinsci / jenkinsci/junit-plugin

[JENKINS-9980] Add the "Publish JUnit test result report" option to maven job configuration page

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

Description

The "Publish JUnit test result report" option is not available when configuring maven 2/3 jobs. I have a use case that I can't get to working without this option.

I'm using maven to build a C++ project with gtests. The google test runs fine and is outputting results to a junit style xml report. I have surefire plugin set to skip because I don't have any java code or java tests in this project.

I would like my maven C++ project to do the following:

1. execute build

2. execute tests

3. publish test reports

4. deploy to artifactory.

It seems like i have two options when setting up a jenkins job:

A. maven 2/3 project OR

B. freestyle project.

Setting up a job with option A will allow me to do 1, 2, and 4, but NOT 3.

Option B will allow me to do 1, 2, and 3, but NOT 4.

The reason why 3 doesn't work in option A is because test reports are only triggered on an execution of the surefire plugin. Again I set the surefire plugin to skip so the test reports are not getting published to the jenkins CI. There's no option to "Publish JUnit test result report" in a maven 2/3 job configuration so I can't publish the reports that gtest generates.

The reason why 4 doesn't work in option B is because freestyle projects do not have the option to publish to artifactory (or it's been deprecated and doesn't seem to work).

I would suggest adding the "Publish JUnit test result report" option to maven 2/3 job configuration to satisfy this use case.

---
Originally reported by khaido, imported from: Add the "Publish JUnit test result report" option to maven job configuration page


  • status: Reopened
  • priority: Critical
  • component(s): junit-plugin
  • resolution: Unresolved
  • votes: 30
  • watchers: 30
  • imported: 2025-11-26

Raw content of original issue

The "Publish JUnit test result report" option is not available when configuring maven 2/3 jobs. I have a use case that I can't get to working without this option.

I'm using maven to build a C++ project with gtests. The google test runs fine and is outputting results to a junit style xml report. I have surefire plugin set to skip because I don't have any java code or java tests in this project.

I would like my maven C++ project to do the following:
1. execute build
2. execute tests
3. publish test reports
4. deploy to artifactory.

It seems like i have two options when setting up a jenkins job:
A. maven 2/3 project OR
B. freestyle project.

Setting up a job with option A will allow me to do 1, 2, and 4, but NOT 3.
Option B will allow me to do 1, 2, and 3, but NOT 4.

The reason why 3 doesn't work in option A is because test reports are only triggered on an execution of the surefire plugin. Again I set the surefire plugin to skip so the test reports are not getting published to the jenkins CI. There's no option to "Publish JUnit test result report" in a maven 2/3 job configuration so I can't publish the reports that gtest generates.

The reason why 4 doesn't work in option B is because freestyle projects do not have the option to publish to artifactory (or it's been deprecated and doesn't seem to work).

I would suggest adding the "Publish JUnit test result report" option to maven 2/3 job configuration to satisfy this use case.

environment

```
jenkins 1.4.0.9

maven-2.2.1

artifactory pro setup with jenkins integration

google test
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Maven 2/3 job configuration and the existing “Publish JUnit test result report” option in freestyle jobs. Check how the junit-plugin handles report publishing outside Surefire, then verify that a Maven job can publish the gtest-generated JUnit XML while retaining its build, test, and Artifactory deployment steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ci-cd, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.