[JIRA] [junit-plugin] (JENKINS-22747) Add Job Configuration Option to NOT fail JUnit Report publish when no xml report files

16 views
Skip to first unread message

adjohnson916@gmail.com (JIRA)

unread,
Jul 20, 2015, 11:19:03 AM7/20/15
to jenkinsc...@googlegroups.com
Anders Johnson commented on Improvement JENKINS-22747
 
Re: Add Job Configuration Option to NOT fail JUnit Report publish when no xml report files

+1

I'd like to be able to configure this plugin so that it won't mark as failed or unstable when no report files are found.

Here's failure output for that scenario in Jenkins ver. 1.607:

Recording test results
ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception
hudson.AbortException: No test report files were found. Configuration error?
	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:116)
	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:93)
	at hudson.FilePath.act(FilePath.java:989)
	at hudson.FilePath.act(FilePath.java:967)
	at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:90)
	at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:120)
	at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:137)
	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
	at hudson.model.Build$BuildExecution.post2(Build.java:183)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
	at hudson.model.Run.execute(Run.java:1766)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:374)
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

cvenegas@esri.com (JIRA)

unread,
Jul 23, 2015, 4:30:10 PM7/23/15
to jenkinsc...@googlegroups.com

+1 here as well. We create jUnit files that fail to be parsed by xUnit. jUnit doesn't have any issues parsing them but if we don't create test files, we get build failures instead of just setting it to unstable or letting it pass.

landolt@royalsys.com (JIRA)

unread,
Oct 15, 2015, 10:09:07 AM10/15/15
to jenkinsc...@googlegroups.com
Paul Landolt reopened an issue
 

Reopened as this issue has not been resolved.

During the "Publish JUnit test result report" Post-build step, the JUnit XML files are collected and processed. If there are no files to collect (e.g., no unit tests written) then the step fails with the message:

ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception
hudson.AbortException: No test report files were found. Configuration error?

While there may be code in place to not fail skipped test, there is no handling of the situation where there are intentionally no JUnit tests.

I manage 300 jobs from templates. It would be onerous to go into jobs and add / remove reporting manually based on the existence or absence of unit test reports.

Compare this to the "Publish Cobertura Coverage Report" post-build step, which has the option to ignore "Fail builds if no reports"

Jenkins / Improvement JENKINS-22747
Change By: Paul Landolt
Resolution: Fixed
Status: Resolved Reopened

landolt@royalsys.com (JIRA)

unread,
Oct 19, 2015, 8:12:02 AM10/19/15
to jenkinsc...@googlegroups.com
Paul Landolt assigned an issue to Paul Landolt
 

I'll take this one. I've worked up a solution. I'll create a branch, get the code in, and make it available for peer review.

My current solution does not have any unit tests, I would really like some input to this as I'm not clear on how to test a plugin without it being installed and on an active Jenkins instance.

Change By: Paul Landolt
Assignee: Paul Landolt

landolt@royalsys.com (JIRA)

unread,
Oct 19, 2015, 8:14:01 AM10/19/15
to jenkinsc...@googlegroups.com
Paul Landolt commented on Improvement JENKINS-22747
 
Re: Add Job Configuration Option to NOT fail JUnit Report publish when no xml report files

If I'm going to create a branch, should I name the branch "JENKINS-22747", or is there a protocol for such a thing from an unvetted participant?

o.v.nenashev@gmail.com (JIRA)

unread,
Oct 19, 2015, 4:12:01 PM10/19/15
to jenkinsc...@googlegroups.com

Hi Paul,

If you crate a branch in your own fork, feel free to set up any name. The only recommendation is to reference the issue in the pull request title and commits.

landolt@royalsys.com (JIRA)

unread,
Oct 19, 2015, 4:20:02 PM10/19/15
to jenkinsc...@googlegroups.com

Will do. I'm just finishing some live testing with the work I've done. I should be able to check in (or push request, or whatever it's called in GIT) the changes within the next 24 hours so that it can be reviewed.

And it does require at least 2 unit tests, so if you see the best way to test them during review, please let me know; I'd like get the chance to learn more regarding testing this particular plugin.

landolt@royalsys.com (JIRA)

unread,
Oct 20, 2015, 12:04:05 PM10/20/15
to jenkinsc...@googlegroups.com
Paul Landolt assigned an issue to Oleg Nenashev
 

Pull request complete. Please excuse any mistakes as I'm just learning how to work with GIT.

Change By: Paul Landolt
Assignee: Paul Landolt Oleg Nenashev

landolt@royalsys.com (JIRA)

unread,
Oct 20, 2015, 1:11:05 PM10/20/15
to jenkinsc...@googlegroups.com
  Please excuse any mistakes as I'm just learning how to work with GIT.      

landolt@royalsys.com (JIRA)

unread,
Oct 28, 2015, 1:18:01 PM10/28/15
to jenkinsc...@googlegroups.com
Paul Landolt assigned an issue to Unassigned
 

Not getting a response to this so I'm going to set it "Unassigned" to see if I can get a nibble from one of the project committers.

Change By: Paul Landolt
Assignee: Oleg Nenashev

o.v.nenashev@gmail.com (JIRA)

unread,
Oct 28, 2015, 1:30:02 PM10/28/15
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Oct 28, 2015, 1:31:03 PM10/28/15
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Improvement JENKINS-22747
 
Re: Add Job Configuration Option to NOT fail JUnit Report publish when no xml report files

Thanks for taking the action.
I've totally missed your PR.I'll try to review it ASAP

jenkins@xgouchet.fr (JIRA)

unread,
Nov 24, 2015, 8:36:02 AM11/24/15
to jenkinsc...@googlegroups.com

landolt@royalsys.com (JIRA)

unread,
Nov 24, 2015, 3:46:02 PM11/24/15
to jenkinsc...@googlegroups.com

There is a code solution for this. Oleg is reviewing the Pull request and should be accepting it into the plugin soon. (That's my take on it)

landolt@royalsys.com (JIRA)

unread,
Dec 10, 2015, 4:31:01 PM12/10/15
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 11, 2015, 3:00:03 AM12/11/15
to jenkinsc...@googlegroups.com

Closing as a duplicate of

JENKINS-12815 . The fchange has been released yesterday (junit-1.10)

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 11, 2015, 3:00:03 AM12/11/15
to jenkinsc...@googlegroups.com
Oleg Nenashev resolved as Duplicate
 
Change By: Oleg Nenashev
Status: Reopened Resolved
Resolution: Duplicate
Reply all
Reply to author
Forward
0 new messages