Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Can the build status be changed manually?

I have been running some builds with JUnit tests and am using a JUnit publisher to publish the results to the build. However I don't want the build to be classed as failed if a single unit test fails.

Is there a way for me to manually edit the build status or at least prevent the jUnitLogPublisher from setting the build to failed if a failure occurs?

0 votes



2 answers

Permanent link
However I don't want the build to be classed as failed if a single unit test fails.


You could use the 'mayFailPattern' of the junitLogPublisher

See this link for a reference: http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.team.build.doc/topics/r_junitlogpublisher.html

mayFailPattern

A substring of a test suite class name. Any test suite class name that contains the pattern is allowed to fail without causing the overall build to fail. The pattern is a simple string, not a regular expression. If not specified, any test suite failure causes the build to fail.


Is there a way for me to manually edit the build status?


If you are controlling the build lifecycle on your own (using Ant).. you could use the "status" attribute of the "completeTeamBuild" Ant task.

See this link for a reference: http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.team.build.doc/topics/r_completebuild.html

status

The status of the contribution. Must be one of the following: OK, ERROR, WARNING, or INFO.

1 vote


Permanent link
Thank you for your response. As far as I understand it the completeTeamBuild attribute is quite final, and I think that calling this task in the middle of the build cycle could mess up the whole process a bit.

However I don't want the build to be classed as failed if a single unit test fails.


You could use the 'mayFailPattern' of the junitLogPublisher

See this link for a reference: http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.team.build.doc/topics/r_junitlogpublisher.html

mayFailPattern

A substring of a test suite class name. Any test suite class name that contains the pattern is allowed to fail without causing the overall build to fail. The pattern is a simple string, not a regular expression. If not specified, any test suite failure causes the build to fail.


Is there a way for me to manually edit the build status?


If you are controlling the build lifecycle on your own (using Ant).. you could use the "status" attribute of the "completeTeamBuild" Ant task.

See this link for a reference: http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.team.build.doc/topics/r_completebuild.html

status

The status of the contribution. Must be one of the following: OK, ERROR, WARNING, or INFO.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 09 '12, 10:00 a.m.

Question was seen: 4,858 times

Last updated: Mar 09 '12, 10:00 a.m.

Confirmation Cancel Confirm