Test result variables
This guide explains and lists the reference for variables available in Test Management webhook payloads when a test result is recorded.
Accessing detailed test result data is important for continuous integration, real-time reporting, and automated defect management. Our webhooks provide a rich set of test result variables that allow you to capture the granular outcome of each test execution. These variables can be utilized to power custom dashboards, trigger alerts based on failure patterns, or update external systems with the latest test status. This guide outlines the available variables, their descriptions, and examples of their typical values to help you build robust integrations.
Before you begin
You configure webhooks once for your account and use them across all BrowserStack products. To create a webhook and subscribe it to test result events, follow Get started with webhooks. For platform-wide concepts, see Core concepts.
Events that include test result variables
A webhook payload contains test result variables when the following event triggers.
| Event | When it triggers |
|---|---|
| Test result added | A test execution finishes and a status of Passed, Failed, Skipped, Blocked, or Error is recorded. |
Test Management variables
These variables are populated from Test Management metadata for the result.
| Variable | Description | Example |
|---|---|---|
TEST_TYPE |
Category or type of the executed test. |
Functional, UI, API, Performance
|
TEST_NAME |
Name of the test that was executed. | Login with valid credentials |
TEST_PLATFORM |
Platform or environment where the test ran. |
Chrome on Windows 10, iOS 16 on iPhone 13
|
TEST_FILE_PATH |
File path of the test script or definition. | tests/auth/login_test.py |
TEST_URL |
Link to the detailed report or execution log. | URL string |
SMART_TAGGED |
Whether the result was automatically tagged. |
true, false
|
IS_AUTO_ANALYZED |
Whether the result was automatically analyzed for failure patterns. |
true, false
|
FAILURE_CATEGORY |
Categorized reason for failure. |
Application Bug, Environment Issue, Test Flakiness
|
IS_PERFORMANCE_ANOMALY |
Whether a performance anomaly was detected. |
true, false
|
IS_MUTED |
Whether the result is muted because of a known issue. |
true, false
|
TEST_TAGS |
Tags associated with the test result. | ["smoke", "login_flow", "critical"] |
RUN_COUNT |
Number of times this test has executed. | 5 |
TEST_DURATION |
Test duration in milliseconds. | 12500 |
TEST_FAILURE_LOG |
Log content or link to the detailed failure log. | Log string or URL |
Execution context variables
The following variables also appear in Test result added webhook payloads when the result was recorded against an executed test run.
| Variable | Description | Example |
|---|---|---|
TEST_TYPE |
Category or type of the executed test. |
Functional, UI, API, Performance
|
TEST_NAME |
Name of the test that was executed. | Login with valid credentials |
TEST_PLATFORM |
Platform or environment where the test ran. |
Chrome on Windows 10, iOS 16 on iPhone 13
|
TEST_FILE_PATH |
File path of the test script or definition. | tests/auth/login_test.py |
TEST_URL |
Link to the detailed report or execution log. | URL string |
SMART_TAGGED |
Whether the result was automatically tagged. |
true, false
|
IS_AUTO_ANALYZED |
Whether the result was automatically analyzed for failure patterns. |
true, false
|
FAILURE_CATEGORY |
Categorized reason for failure. |
Application Bug, Environment Issue, Test Flakiness
|
IS_PERFORMANCE_ANOMALY |
Whether a performance anomaly was detected. |
true, false
|
IS_MUTED |
Whether the result is muted because of a known issue. |
true, false
|
TEST_TAGS |
Tags associated with the test result. | ["smoke", "login_flow", "critical"] |
RUN_COUNT |
Number of times this test has executed. | 5 |
TEST_DURATION |
Test duration in milliseconds. | 12500 |
TEST_FAILURE_LOG |
Log content or link to the detailed failure log. | Log string or URL |
Reference variables in your payload
Wrap each variable in handlebars when you reference it in a webhook URL, header, or payload body. For example: ``.
For payload templates and worked examples, see Get started with webhooks.
By leveraging these test result variables, you can build powerful custom integrations that react dynamically to your test execution outcomes. Whether you are integrating with incident management systems, data analytics platforms, or custom reporting tools, these variables provide the data points needed for comprehensive automation. If you have any further questions or require additional variables, refer to our full API documentation or contact our support team.
Next steps
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
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!