Test case variables
This guide explains and lists the reference for variables available in Test Management webhook payloads when a test case is created, updated, deleted, or archived.
Test case variables available within our webhooks provide comprehensive details about your test cases. It allows you to build robust integrations and automate workflows based on real-time test data. By leveraging these variables, you can access specific attributes of a test case, such as its title, ID, status, and associated assets, directly within their webhook payloads. This guide outlines each available variable, its description, and an example of its typical value or structure.
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 case events, follow Get started with webhooks. For platform-wide concepts, see Core concepts.
Events that include test case variables
A webhook payload contains test case variables when one of the following events trigger.
| Event | When it triggers |
|---|---|
| Test case created | A new test case is added to the project. |
| Test case updated | An attribute of an existing test case is modified. |
| Test case deleted | A test case is permanently removed. |
| Test case archived | A test case state changes to archived. |
Available variables
| Variable | Description | Example |
|---|---|---|
TC_ID |
Unique identifier for the test case. | TC-101 |
TC_TITLE |
Title of the test case. | Verify sign in function |
TC_TYPE |
Type or category of the test case. |
Smoke, Functional, Acceptance
|
TC_STATE |
Current state of the test case. |
Active, Draft
|
TC_FOLDER_ID |
ID of the folder containing the test case. | 53491 |
TC_REQUIREMENTS |
Requirements mapped to the test case. | ["REQ-1", "REQ-2"] |
TC_TAGS |
Tags assigned to the test case. | ["Smoke", "Sanity"] |
TC_AUTOMATION_STATUS |
Automation status of the test case. |
Automated, Not Automated
|
TC_TEMPLATE |
Template used for the test case. |
Steps, Free text
|
TC_DESCRIPTION |
Description in Markdown. | See body content. |
TC_PRECONDITION |
Preconditions in Markdown. | User is logged out |
TC_STEPS |
Steps and expected results in Markdown. | 1. Navigate to login page. *Expected:* Login page appears. |
TC_OWNER |
Email address of the test case owner. | john.doe@example.com |
TC_CUSTOM_FIELDS |
Custom fields as key-value pairs. | {"Module":"Authentication","Severity":"High"} |
TC_PRIORITY |
Priority level of the test case. |
High, Medium, Low
|
TC_ATTACHMENTS |
Array of attachment objects. | See structure below. |
TC_ATTACHMENTS structure
[
{
"size": "200 KB",
"name": "diagram.jpg",
"content_type": "image/jpeg",
"url": "https://.../diagram.jpg?AWSAccessKeyId=...&Expires=...&Signature=..."
},
{
"size": "50 KB",
"name": "report.pdf",
"content_type": "application/pdf",
"url": "https://example.com/attachments/report.pdf"
}
]
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 case variables are designed to give you granular control and detailed insights into your test management processes through webhooks. By correctly parsing and utilizing these variables in your custom integrations, you can streamline reporting, trigger external actions, and maintain synchronized data across your development and testing tools. 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!