Test plan variables
This guide explains and lists the reference for variables available in Test Management webhook payloads for test plan lifecycle events.
Test plan variables that are available through our webhooks, designed to provide comprehensive insights into your test execution plans. These variables enable you to integrate test plan data directly into their custom applications, reporting tools, or automation scripts. By leveraging these variables, you can access critical information such as plan status, progress, associated project details, and key metrics like the count of passed, failed, or blocked test cases. Following is a detailed list of each variable, its description, and an example of its expected value or format.
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 plan events, follow Get started with webhooks. For platform-wide concepts, see Core concepts.
Events that include test plan variables
A webhook payload contains test plan variables when one of the following events trigger.
| Event | When it triggers |
|---|---|
| Test plan created | A new test plan is added to the project. |
| Test plan updated | An attribute of an existing test plan is modified. |
| Test plan completed | A test plan reaches Completed status. |
| Test plan deleted | A test plan is permanently removed. |
Available variables
| Variable | Description | Example |
|---|---|---|
PROJECT_ID |
Unique identifier for the project that contains the test plan. | PR-123 |
TP_ID |
Unique identifier for the test plan. | TP-123 |
TP_TITLE |
Title of the test plan. | Regression Plan |
TP_STATE |
Current state of the test plan. |
Active, Completed
|
TP_STATUS |
Overall progress or status of the test plan. | In progress |
TP_DESCRIPTION |
Description of the test plan in Markdown. | This plan covers all critical regression test cases for the Q2 release. |
TP_START_DATE |
Start date and time in ISO 8601 format. | 2024-05-08T12:45:34.651+00:00 |
TP_END_DATE |
End date and time in ISO 8601 format. | 2024-05-08T12:45:34.651+00:00 |
TP_ACTIVE_TR_COUNT |
Number of active test runs in this test plan. | 3 |
TP_CLOSED_TR_COUNT |
Number of closed test runs in this test plan. | 4 |
TP_TOTAL_PASSED_TC |
Test cases in this plan with status Passed. |
1 |
TP_TOTAL_FAILED_TC |
Test cases in this plan with status Failed. |
4 |
TP_TOTAL_BLOCKED_TC |
Test cases in this plan with status Blocked. |
5 |
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.
These test plan variables are essential for creating dynamic and responsive integrations that react to the lifecycle and progress of your testing efforts through webhooks. By incorporating these details you can automate notifications, update external dashboards, and ensure all stakeholders are informed about the state of your test plans. 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!