The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bamboo Build should NOT fail if JUnit parser task fail

Venkat Pasula
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 7, 2021

We are using Bamboo Built in Maven task to compile  java code , run tests  and  Junit Parser to parse the test results as shown below

Stage 1 

             Job 1

                      Maven Task1 

                      Junit Parser1

Stage 2 

              Job 2

                       Maven Task2

                       Junit Parser2

 

If any test cases fail , Junit task is failing  the entire build.

Is there a way we can make Junit parser NOT to fail the build?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Cristiano Mariano
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 7, 2021

Hi @Venkat Pasula ! Welcome to the community!

In fact, I believe this is by design: we should not consider a build as "green" if it has failing tests.

As far as I remember, even without a Junit Parser task, the build would fail because Maven output would have an error code (this is why we always put our Junit Parser tasks as final).

Hope this helps!

Pavithra Navaneeth
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 8, 2023

Hi @Cristiano Mariano 

I understand the intention behind the Junit parser task to fail for the test failure. But we have a specific need in our deployment pipeline - apart from unit test run, we recently included API contract testing as one of our stage and we want to display the test results in the artifact but do not want to fail the build (as we do not want to stop the deployment because of the failed test runs for now as its a new capability) Note: As this contract testing stage is not in the end, and we have other stage as final - we can't get a way out by making it as final

 

Is there any alternate options for this ?

TAGS
AUG Leaders

Atlassian Community Events