Skip to main content
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Test Failure Analysis agent

Automate root cause analysis (RCA) for test failures in your test suites.

Test Failure Analysis agent uses AI to analyze failed test cases, suggests the root cause of the failure, and categorizes the test failure for you. This helps teams quickly identify and resolve issues in their test workflows.

To enhance the performance of your AI agents, ensure they have a wide range of contextual information available, including logs and metadata. For an effective way to gather and provide this data, use the BrowserStack SDK.

Key features

The Test Failure Analysis agent includes the following key features:

  • Automated RCA for failed test cases
  • AI-powered correlation of logs, screenshots, and test metadata
  • Actionable insights and recommendations for faster triage and resolution

Enable BrowserStack AI

You need to enable BrowserStack AI to use the Test Failure Analysis agent. Only Owner or Admin users can change the BrowserStack AI settings.

Follow these steps to enable BrowserStack AI:

  1. Visit the Test Reporting & Analytics settings page.
  2. Enable BrowserStack AI.

How to view root cause analysis (RCA) results

  1. Ensure that you have enabled BrowserStack AI.

  2. Navigate to Test Listing in your automation dashboard.
  3. Locate the failed test case you want to analyze.
  4. Click Debug with AI or View AI RCA. A button named Debug with AI next to a failed test case listed in the test listing of the BrowserStack Automation dashboard
  5. After the Test Failure Analysis agent completes its analysis, you can see:
    • The RCA summary
    • An error summary
    • Log evidence
    • Detailed analysis with confidence level, impact, how to fix, and failure type.

    A summary of a root cause analysis described next to a test failure listing

    A detailed analysis of a test failure

    A detailed explanation of how to fix the issue

    A detailed explanation of how to fix the issue, including code samples

  6. If you find the categorization correct in your context, you can bulk apply the failure type to similar test failures by clicking Bulk Apply to similar failures.

A test failure is categorized as Environment Issue. Also, there is a link titled Bulk Apply to similar failures

How it works

  1. The agent monitors test executions and detects failures.
  2. It collects relevant artifacts such as logs, screenshots, and metadata.
  3. AI models analyze the data to identify patterns and anomalies.
  4. The agent generates a root cause summary and recommended actions.
  5. Results appear in your automation dashboard for review.

Benefits

  • Reduces manual effort in debugging failed tests.
  • Improves accuracy and speed of RCA.
  • Enables teams to focus on fixing issues rather than searching for causes.
  • Automatically categorizes test failures to help prioritize fixes.
  • Enhances visibility into test health and reliability.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle