Quarantining failing tests

There may be times when you want to prevent a failing test from causing the whole build to fail.

Possible scenarios where this may be useful include:

  • You want to build an artifact despite there being a failing test, but can't do this while the plan build is failing.
  • In test-driven development (TDD), a test will fail until the functionality is implemented - you want to quarantine all but the relevant tests.
  • A test may give unpredictable results, perhaps because of infrastructure issues or dependencies.
  • You want to remove a test from a build, but don't want to alter or delete the test source code because doing so could affect another Bamboo plan.

In Bamboo, you can temporarily disconnect any test's results from the plan build results by quarantining the test. The test is still run whenever the plan is built, but the test's results do not affect the plan's build results.

You can always restore a test's results to the build results when required, for example if the test is now passing.

All the quarantined tests for a plan are displayed on the Quarantined tests tab of the plan summary. The status bar for each test shows the recent build history of the test.

Enable test quarantining

To enable test quarantining:

  1. In the upper-right corner of the screen, select
    Administration bamboo administration icon
    > Overview.
  2. Under Plans, select Quarantine settings.
  3. On the Quarantine settings page, select Enable quarantine.
  4. Select Save.

Quarantine a failing test

  • You need plan administrator or build permission to quarantine a test.
  • Test quarantining must be enabled

To quarantine a test:

  1. Select Builds > All build plans > #buildresult to go to the build result where the test is failing.
  2. Select Quarantine for the failing test (in the Summary section of the build).

Restore a quarantined test to a build

  • You need plan administrator permission to restore a test.
  • Test quarantining must be enabled.

To restore a quarantined test to a build:

  1. Go to your plan's summary.
  2. Select the Quarantined tests tab.
  3. Select Unleash for the test to be restored.


Last modified on Oct 10, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.