You can monitor the last-build status through your project page using BrowserStack status badges.
BrowserStack Status Badges
You can monitor your last build’s status, from your project page, using BrowserStack status badges.
Build status and corresponding badges:
|Latest build ran successfully|
|Latest build has a session error|
|Latest build has a session timeout|
|A build is currently executing|
|Project doesn't have any builds|
|Bad request e.g. invalid key|
Adding Status Badges to your project page
Badges can be added as markdown (to your README) or an HTML snippet (to your project site). Follow the steps below:
1. Pick a project
To add status badges to a project, you need to give it a project name. If you haven’t specified a project name for your builds / sessions, add the capability project: <project_name> in your test scripts.
Run the following command:
curl -u "USERNAME:ACCESS_KEY" https://api.browserstack.com/automate/projects.json
2. Obtain badge key
Obtain the status badge key for your project.
curl -u "USERNAME:ACCESS_KEY" https://api.browserstack.com/automate/projects/<project-id>/badge_key
3. Add snippet to your project site or README
Replace the <badge_key> with what you obtained in the previous step and
Add the following markdown to your project's README.
OR you can add the following HTML snippet to your project site.
<a href="https://automate.browserstack.com/public-build/<badge_key>"><img src='https://automate.browserstack.com/badge.svg?badge_key=<badge_key>'/></a>