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?
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?
2 answers
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.
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.
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.
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.
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.