Hi Bitbucket community!
We’re thrilled to announce that Tests is now in open beta for Bitbucket Pipelines! This new feature for Bitbucket Cloud Standard and Premium workspaces introduces a single place inside your repository to:
- See the health of every test over time
- Drill into detailed execution history for each test
- Identify and quarantine flaky tests so they stop blocking your team
- Automatically skip quarantined tests in your pipelines’s build script to keep builds fast and reliable
All from within the place you already use to review code and powered by the JUnit-style XML reports you already generate today.
What is Tests?
Once enabled, you’ll see a new Tests tab in your Bitbucket repository.
This tab includes a summaries page that aggregates data for each individual test based on its recent runs, including:
- Failure rate – how often this test fails
- Average duration – how long it usually takes
- Variance – how much its execution time fluctuates
You can search and filter through the view to find a specific test, filter by labels, and filter by test state (such as whether the test is considered flaky or has been quarantined)
This makes it easy to spot frequently failing tests that hurt developer conference, slow tests that drag out pipelines, or unstable tests with highly variable run times.
You can also click into an individual test to see details about its execution, including:
- Build – the build that ran the test
- Commit – the commit associated with that run
- Last executed – when it last ran
- Execution duration – how long it took
- Outcome – whether it passed or failed
Take back control from flaky tests
With Tests, you can classify tests as problematic, specifically as:
- Flaky – unstable and needing attention
- Quarantined – unreliable enough that it shouldn’t block builds right now
Behind the scenes, Bitbucket maintains a test metadata file for your repository that tracks these classifications. Your pipelines can download this file and use it to skip tests marked as 'quarantined.'
Check out the blog to see exactly how.
Try it now and share your feedback
If your Bitbucket Cloud workspace is on the Standard and Premium plan, you are automatically able to use these beta features by default.
- Enable Bitbucket Pipelines for your repository (if it isn’t already).
- Configure your test framework to generate JUnit-style XML reports or change the paths which are identified by the tests feature.
- Open your repository and click the Tests tab.
- Explore Test summaries and drill into Test executions to see your current test health.
- Start marking flaky and quarantined tests to bring structure and clarity to your suite.
- (Optional) Opt in to using the test metadata file in your pipeline steps so you can automatically skip quarantined tests and keep builds green and fast.
As we build out Tests, your feedback will help shape its future. Whether you have feedback, questions, or need help, this community thread is the go-to place to discuss your experience with Tests, report issues, or share ideas. Your input will directly influence the GA release and beyond, so let us know how Tests is working for you!