Flaky tests stall pull requests. Slow tests drag out builds. Outdated tests add maintenance work that’s easy to put off.
To help optimize your test suite, we’re adding two new agents in Bitbucket, Test Optimizer and Test Cleanup and an improved Flaky Test Fixer. With these agents, your team will spend less time babysitting tests and more time shipping.
Meet the agents
- Test Optimizer speeds up and improves tests that are slow, bloated, or only lightly testing your code.
- Test Cleanup safely removes a test you no longer need, cleans up what it leaves behind, and verifies everything still builds and passes.
- Flaky Test Fixer (now improved): helps diagnose and fix tests that pass and fail intermittently. It’s now smarter at finding the root cause and confirming the fix.
How it works
Open the Tests tab, pick a test, and choose an agent. The agent does the work and opens a draft pull request for you to review and approve. You’re always in control – nothing changes until you merge.

How to enable it
The agents run on Agentic Pipelines, which a workspace admin turns on once. Here’s the full path:
- Go to Workspace settings in Bitbucket.
- Open the Agentic Pipelines section.
- Enable Agentic Pipelines for the workspace.
- Turn on the test agents you want to offer your team – Test Optimizer, Test Cleanup, and Flaky Test Fixer.
- Save. The enabled agents now appear for everyone in the Tests tab of that workspace – no other setup or configuration required.
If you don’t see the agents in the Tests tab, check with your workspace admin that Agentic Pipelines and the individual agents are switched on.

Availability and getting started
Bitbucket Tests is currently in Beta and available on Bitbucket Cloud Standard and Premium plans.
If your team is new to Bitbucket Tests, check out our getting started guide to onboard your repositories and set up test reporting. If you have questions, our support team is here to help.
Have feedback, questions, or ideas for new agents? We’d love to hear from you. Join the conversation on the Atlassian Community.


