JUnit Results Report Causes 'UNSTABLE' Build?

2,501 views
Skip to first unread message

Chris Beech

unread,
Mar 14, 2014, 2:23:36 PM3/14/14
to jenkins...@googlegroups.com

Hi there,

 

I am executing JUnits as part of my build and am publishing JUnit test result reports as a post-build action.

 

The problem is, if any JUnit fails it seems that the JUnit test result publisher is changing the build status to “UNSTABLE” which means the build isn’t classed as successful therefore the SVN tagging doesn’t happen…

 

Recording test results

Build step 'Publish JUnit test result report' changed build result to UNSTABLE

No Subversion tagging for unsuccessful build.
Finished: UNSTABLE

 

How can I control the behaviour of the JUnit test result report to not be marking builds as unstable when tests fail/error?

 

Thanks,

 

Chris

 

Mark Waite

unread,
Mar 14, 2014, 4:28:42 PM3/14/14
to jenkins...@googlegroups.com
In general, marking a build as unstable for test failures is the preferred practice.  It assures that test failures are visible to downstream consumers (like other jobs, the REST API, etc.).

You may want to double check if there is a setting in the Subversion tagging plugin which will allow it to tag even if the build is unstable.  I'm not aware of any way to force the job to be stable when it has failing tests.

Mark Waite


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite

Daniel Beck

unread,
Mar 14, 2014, 4:50:58 PM3/14/14
to jenkins...@googlegroups.com

On 14.03.2014, at 21:28, Mark Waite <mark.ea...@gmail.com> wrote:

> You may want to double check if there is a setting in the Subversion tagging plugin which will allow it to tag even if the build is unstable.

No such luck:
https://github.com/jenkinsci/svn-tag-plugin/blob/master/src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java#L70

---

Also, I'd like to point out that in core UI, 'successful' builds are those with SUCCESS or UNSTABLE results, while 'stable' refers to those with SUCCESS result. IOW, Subversion Tagging Plugin only allows tagging when builds are stable, but uses the wrong term.

Reply all
Reply to author
Forward
0 new messages