Optimize a test

Use the Test Optimizer to allow AI help identify how tests can be improved, such as finding weak or missing assertions, uncovering edge cases, or pointing our where there may be slow execution). The Test Optimizer rewrites (and strengthens) the test, validates the fix by running it in an agentic Pipeline container, and raises a draft Pull Request for your review.

Enable Test Optimizer

You must be a workspace administrator to enable the Test optimizer.

  1. Select the Settings cog , and then select Workspace settings.

  2. Select AI, and then select Agentic pipelines.

  3. Select the Test Optimizer toggle, and then select the Enable button on the Enable “Test Optimizer” agent dialog. Note: The toggle should be green and have a checkmark when it is enabled.

Optimize a test using AI

  1. Select Tests from within the repository on the left sidebar.

  2. Select the Actions … dropdown menu associated to the test you want to optimize.

  3. Select Optimize test.

  4. Select the branch, if necessary, and add any additional information for the AI agent in the Custom instructions text field.

  5. Select the Optimize test button.

Once the test has been optimized, you can access the pull request that was created with any suggestions for optimizations by going to the Pull requests page and selecting the appropriate pull request.

 

Still need help?

The Atlassian Community is here for you.