Update BDD test case
Update BDD fields for an existing BDD test case in a project using the BrowserStack Test Management API.
The Update BDD test case API allows you to modify the feature, scenario, or background fields of an existing BDD test case. You can only update these fields if the test case uses the BDD template.
Endpoint
Use this API to update BDD fields for a test case. The API enforces that only BDD test cases can be updated, and test_steps cannot be modified for BDD test cases.
Request Parameters
Request
curl -X PATCH \
https://api.browserstack.com/projects/<project_id>/test-cases/<test_case_id> \
-H 'Content-Type: application/json' \
-d '{
"feature": "Login Feature",
"scenario": "Valid user logs in",
"background": "User is on login page"
}'
-
project_id* string
The unique identifier of the project.
-
test_case_id* string
The unique identifier of the test case.
-
feature string
The feature name for the BDD test case.
-
scenario string
The scenario description for the BDD test case.
-
background string
The background context for the BDD test case.
Response attributes 200
application/json
Response
{
"test_case": {
"id": "tc-123",
"template": "test_case_bdd",
"feature": "Login Feature",
"scenario": "Valid user logs in",
"background": "User is on login page",
"created_at": "2025-08-21T12:00:00Z",
"updated_at": "2025-08-21T12:10:00Z"
}
}
-
test_case Object
The updated BDD test case object.
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.