Skip to main content
🚀 Become an AI-ready QA professional: Join 5k+ QAs at global summit shaping the future of testing! Register Now!
No Result Found
Get help or connect with the developer community Join Discord Community -> Join Discord Community ->

Status badges

Monitor your latest build status using Test Reporting & Analytics status badges.

Status badges are real-time indicators that show the current status of your latest test builds directly in your project’s README file, website, or internal dev portals. Status badges automatically update to reflect your most recent build results, helping visitors quickly understand your project’s test health.

Status badges build confidence and transparency in your user community and help teams understand the state of projects for internal reference and quick access. These are perfect for open source projects too.

Status badges corresponding to each build type

The following table lists the different types of status badges in Test Reporting & Analytics:

Status Badge Description
Test Observability: Passed Test ObservabilityPassed Latest build ran successfully
Test Observability: failed Test Observabilityfailed Latest build has a session error
TRA Status No such build found
Test Observability: running Test Observabilityrunning A build is currently executing
A screenshot of a sample flaky badge Indicates the percentage of flaky tests in your build, along with a color code
A screenshot of a sample stability badge Indicates the percentage of stable or non-flaky tests in your build, along with a color code
A screenshot of a sample new failure badge Indicates the number of newly failed tests in your build

Add status badges to your project

Follow these steps to add status badges to your project:

Generate a badge key Use your Test Reporting & Analytics credentials to generate a badge key for your specific project and build:

You can use the following syntax:

Terminal
Copy icon Copy

Sample Response:

Terminal
Copy icon Copy

The parameters are:

  • project_name (required): Your Test Reporting & Analytics project name
  • build_name (required): Specific build name to monitor
  • user_name (optional): Filter by user who triggered the build
  • build_tags (optional): Filter by build tags
  • framework (optional): Filter by test framework

Add badge to your README file or website
Use the generated badge key to embed status badges in your project’s README or website.

You can use the following Markdown format for README files:

[![Test Reporting & Analytics Status](https://api-automation.browserstack.com/ext/v1/badge.svg?badge_key=<badge_key>&type=<badge_type>)](https://api-automation.browserstack.com/ext/v1/badge/build?badge_key=<badge_key>)

You can use the following HTML format for websites:

<a href="https://api-automation.browserstack.com/ext/v1/badge/build?badge_key=<badge_key>">
  <img src="https://api-automation.browserstack.com/ext/v1/badge.svg?badge_key=<badge_key>&type=<badge_type>" alt="BrowserStack Status">
</a>

Choose your badge type Replace <badge_type> with one of these options:

  • status: For the overall build pass/fail status
  • flaky: For the percentage of flaky tests
  • stability: Fr the build stability percentage
  • new_failures: For a count of new test failures

If no type parameter is specified, the status badge is used by default.

Here are a few examples:

  • Basic status badge:
    [![BrowserStack Status](https://api-automation.browserstack.com/ext/v1/badge.svg?badge_key=abc123def456ghi789)](https://api-automation.browserstack.com/ext/v1/badge/build?badge_key=abc123def456ghi789)
    
  • Flakiness badge:
    [![BrowserStack Status](https://api-automation.browserstack.com/ext/v1/badge.svg?badge_key=abc123def456ghi789&type=flaky)](https://api-automation.browserstack.com/ext/v1/badge/build?badge_key=abc123def456ghi789)
    
  • Multiple badges:
    [![Build Status](https://api-automation.browserstack.com/ext/v1/badge.svg?badge_key=abc123def456ghi789&type=status)](https://api-automation.browserstack.com/ext/v1/badge/build?badge_key=abc123def456ghi789)
    
    [![Stability](https://api-automation.browserstack.com/ext/v1/badge.svg?badge_key=abc123def456ghi789&type=stability)](https://api-automation.browserstack.com/ext/v1/badge/build?badge_key=abc123def456ghi789)
    
    [![Flakiness](https://api-automation.browserstack.com/ext/v1/badge.svg?badge_key=abc123def456ghi789&type=flaky)](https://api-automation.browserstack.com/ext/v1/badge/build?badge_key=abc123def456ghi789)
    

Badges work without requiring viewers to have Test Reporting & Analytics access. Clicking a status badge takes users to a public view of your build results or can take users to a private view requiring a login. You need to enable public links to enable public view to your builds and tests.

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