Build status showing Success even though there were failures
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
A build result status shows as Successful, however, there were failures during the build execution.
Environment
Bamboo with Quarantine enabled.
Diagnosis
Reviewing the build result logs, you can see the following message that indicates the task status is changing from FAILED to SUCCESS because its tests were quarantined.
simple 10-Jun-2022 06:33:31 Failing task since return code of [...] was 1 while expected 0
simple 10-Jun-2022 06:33:31 Parsing test results under /data/shared/build-dir/<BUILD_KEY>...
simple 10-Jun-2022 06:35:12 Changing Task Result to SUCCESS as all failed tests were quarantined.
simple 10-Jun-2022 06:35:12 Finished task 'Maven 3.x' with result: Success
Cause
Tests that failed but were quarantined won't affect the build's overall status.
Solution
- Go to the Build Result that shows as successful but had failing tests.
- Go to the Tests tab.
- You should see one (or more) tests there.
You can remove them from Quarantine by clicking their respective Settings icon > Resume.
You can still keep tests quarantined, just resume those that, if failed, should also fail the build. More details on Quarantining failing tests.