Test plans
Test plans help you to group, organize, and track linked test runs. Our REST API provides comprehensive endpoints for handling test plans, enabling you to automate and streamline your testing workflow. With these endpoints, in a project, you can create test plans and access list of test runs linked to a test plan.
Get the list of test plans
Invoking this API will fetch the list of test plans in a project. You will need the id
of the project to access its list of test plans.
Request Parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://test-management.browserstack.com/api/v2/projects/PR-1/test-plans
-
project_id* String
Identifier of the project.
Response Attributes 200 OK
json
Response
{
"success": true,
"test_plans": [
{
"active_state": "active",
"description": "testing of high-risk modules with potential for significant impact on functionality.",
"identifier": "TP-174",
"test_runs_count": {
"active": 4,
"closed": 3
},
"name": "TP_46",
"project_id": "PR-1",
"start_date": "2024-02-19T00:00:00.000Z",
"end_date": null,
"created_at": "2024-02-27T11:47:44.000Z"
},
{
"active_state": "active",
"description": "Tests designed to validate core user login functionality.",
"identifier": "TP-173",
"test_runs_count": {
"active": 10,
"closed": 2
},
"name": "TP-23",
"project_id": "PR-1",
"start_date": "2024-02-08T00:00:00.000Z",
"end_date": null,
"created_at": "2024-02-27T11:47:33.000Z"
}
]
}
-
success Boolean
API call is executed successfully.
-
test_plans Array
This list has information about a specific test plan.
-
active_state String
Status of the test plan.
-
description String
Brief information about the test plan.
-
identifier String
Identifier of the test plan.
-
test_runs_count Integer
Gives the count of active test runs and closed test runs.
-
name String
Name of the test plan.
-
project_id String
Identifier of the Project.
-
start_date String
The date when the test plan begins.
-
end_date String
The date when the test plan ends.
-
created_at String
The time at which the test plan was created on BrowserStack servers.
-
Create test plan
Invoking this API will create a test plan programmatically. To create a test plan, you will need the id
of the project in which the test plan should be created.
Request Parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST https://test-management.browserstack.com/api/v2/projects/PR-127/test-plans
-
project_id* String
Identifier of the project.
Request Body
Request Body
{
"name": "Data Migration",
"description": "Data Migration test plan outlines the steps and criteria for verifying accurate and complete data transfer between systems, ensuring a smooth and reliable transition.",
"start_date": "2023-12-30",
"end_date": "2023-12-31"
}
-
name* String
Name of the test plan.
-
description String
Brief information about the test plan.
-
start_date String
The date when the test plan begins.
-
end_date String
The date when the test plan ends.
Response Attributes 200 OK
json
Response
{
"success": true,
"test_plan": {
"active_state": "active",
"description": "Data Migration test plan outlines the steps and criteria for verifying accurate and complete data transfer between systems, ensuring a smooth and reliable transition.",
"identifier": "TP-25",
"test_runs_count": {
"active": 0,
"closed": 0
},
"name": "Data Migration",
"project_id": "PR-127",
"start_date": "2023-12-30T00:00:00.000Z",
"end_date": "2023-12-31T00:00:00.000Z",
"created_at": "2024-01-05T14:12:43.722Z"
}
}
-
success Boolean
API call is executed successfully.
-
test_plan JSON Object
This list has information about a specific test plan.
-
active_state String
Status of the test plan.
-
description String
Brief information about the test plan.
-
identifier String
Identifier of the test plan.
-
test_runs_count Integer
Gives the count of active test runs and closed test runs.
-
name String
Name of the test plan.
-
project_id String
Identifier of the Project.
-
start_date String
The date when the test plan begins.
-
end_date String
The date when the test plan ends.
-
created_at String
The time at which the test plan was created on BrowserStack servers.
-
Update test plan
Invoking this API allows you to update test plan in a given project. To update a test plan, you will need both the id
of the project and the id
of the test plan within that project.
Request Parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST https://test-management.browserstack.com/api/v2/projects/{project_id}/test-plans/{test_plan_id}/update
-
project_id* String
Identifier of the project.
Request Body
Request Body
{
"test_plan": {
"name": "Test Plan - 25/01/2024",
"plan_status": "completed",
"description": "Worked Upon",
"start_date": "2024-02-02T00:00:00.000Z",
"end_date": "2024-02-02T00:00:00.000Z"
}
}
-
name String
Name of the test plan.
-
plan_status String
State of the test plan.
-
description String
Brief information about the test plan.
-
start_date String
The date when the test plan begins. The start date is optional. If you do not specify, the current date is considered.
-
end_date String
The date when the test plan ends. If you do not specify, the current date is considered.
Response Attributes 200 OK
json
Response
{
"success": true,
"test_plan": {
"active_state": "completed",
"plan_status": "completed",
"description": "Worked Upon",
"identifier": "TP-25",
"test_runs_count": {
"active": 0,
"closed": 0
},
"name": "Test Plan - 25/01/2024",
"project_id": "PR-127",
"start_date": "2023-12-30T00:00:00.000Z",
"end_date": "2023-12-31T00:00:00.000Z",
"created_at": "2024-01-05T14:12:43.722Z"
}
}
-
active_state String
State of the test plan.
-
plan_status String
State of the test plan.
-
description String
Brief information about the test plan.
-
Identifier String
Identifier of the test plan.
-
test_runs_count Integer
Count of number of test runs.
- Show 5 more
-
name String
Name of the test plan.
-
project_id String
Identifier of the project.
-
start_date String
The time when the test plan begins.
-
end_date String
The time when the test plan has to end.
-
created_at String
The time the test plan was created on BrowserStack servers.
Get test run linked to a test plan
Invoking this API will fetch the list of test runs linked to a test plan. You will need the id
of the project and id
of the test plan to access its list of test runs. The sample request has PR-127
and TP-25
as placeholders representing project ID and test plan ID respectively.
Request Parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://test-management.browserstack.com/api/v2/projects/PR-127/test-plans/TP-25/test-runs
-
project_id* String
Identifier of the project.
-
test_plan_id* String
Identifier of the test plan.
Response Attributes 200 OK
json
Response
{
"success": true,
"test_runs": [
{
"active_state": "active",
"run_state": "new_run",
"created_at": "2024-01-05T14:13:58.000Z",
"description": "Test Run created",
"identifier": "TR-26",
"name": "Automated UI testing",
"assignee": "john@email.com",
"project_id": "PR-127",
"test_cases_count": 0
},
{
"active_state": "active",
"run_state": "new_run",
"created_at": "2024-01-04T11:13:16.000Z",
"description": "Test Run created",
"identifier": "TR-23",
"name": "Performance test plan",
"assignee": "brown@email.com",
"project_id": "PR-127",
"test_cases_count": 0
},
{
"active_state": "active",
"run_state": "new_run",
"created_at": "2024-01-04T07:43:13.000Z",
"description": "Regression test plan",
"identifier": "TR-12",
"name": "Test Run-03/01/2024",
"assignee": "selva@email.com",
"project_id": "PR-127",
"test_cases_count": 0
}
]
}
-
success Boolean
API call is executed successfully.
-
test_runs Array
List of test runs linked to a test plan.
-
active_state String
Status of the test run.
-
run_state String
State of the test run. The valid states are new_run, in_progress, under_review, rejected, done, and closed.
-
created_at String
The time at which the test run was created on BrowserStack servers.
-
description String
Brief information about the test run.
-
identifier String
Identifier of the test run.
-
name String
Name of the test run.
-
assignee String
Email of the test run assignee.
-
project_id String
Identifier of the Project.
-
test_cases_count Integer
Count of number of test cases.
-
Get test plan details
Invoking this API will fetch the test plan details. You will need the id
of the project and the id
of that test plan to access it’s details.
Request Parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://test-management.browserstack.com/api/v2/projects/PR-1/test-plans/TP-2
-
project_id* String
Identifier of the project.
-
test_plan_id* String
Identifier of the test plan.
Response Attributes 200 OK
json
Response
{
"success": true,
"test_plan": {
"active_state": "active",
"plan_status": "new",
"description": "",
"identifier": "TP-2",
"test_runs_count": {
"active": 1,
"closed": 0
},
"name": "Test Plan - 25/01/2024",
"project_id": "PR-1",
"start_date": "2024-01-25T00:00:00.000Z",
"end_date": null,
"created_at": "2024-01-25T11:35:40.000Z",
"test_runs": [
{
"identifier": "TR-1",
"name": "Test Run-29/11/2023"
},
{
"identifier": "TR-2",
"name": "Test Run-30/11/2023"
}
...
],
"links": {
"test_runs": "/api/v2/projects/PR-2/test-plans/TP-2/test-runs"
},
}
}
-
active_state String
State of the test plan.
-
plan_status String
State of the test plan.
-
description String
Brief information about the test plan.
-
Identifier String
Identifier of the test plan.
-
test_runs_count Integer
Count of number of test runs.
- Show 7 more
-
name String
Name of the test plan.
-
project_id String
Identifier of the project.
-
start_date String
The time when the test plan starts.
-
end_date String
The time when the test plan has to stop
-
created_at String
The time the test plan was created on BrowserStack servers.
-
test_runs Array
This list has information about a specific test run.
-
identifier String
Identifier of the test run.
-
name String
Name of the test runs.
-
-
links String
API endpoint url of the test run.
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.