Get test case list API in Automated tests
Use this API to get a list of test cases executed by the Automated tests along with the basic details of these test cases.
get test case list
If Geo Region Restriction (GRR) is enabled for your account, add your region code to the host name:
api-accessibility-<region>.browserstack.com. See Geo Region Restriction endpoints for the region codes and examples.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api-accessibility.browserstack.com/api/automated-tests/v1/builds/{thBuildId}/test-cases
-
next_page String
Used to fetch subsequent pages from the API when has_next parameter is true. Pass the next_page reference received in the response of last request.
Response Attributes 200 OK JSON
Response
{
"testCases": [
{
"id": 1325069,
"name": "BStack Sample Test - Add product to cart",
"status": "failed",
"time": "2024-12-15T13:09:30.688Z",
"summary": {
"pageCount": 1,
"componentCount": 12,
"issueCount": 76,
"severityBreakdown": {
"minor": 0,
"serious": 61,
"critical": 2,
"moderate": 13
}
},
"file": "/src/test/resources/features/sample.feature",
"osData": {
"name": "OS X",
"version": null,
"logo": "mac"
},
"browserData": {
"name": "chrome",
"version": "131.0.6778.70",
"logo": "chrome"
},
"tags": null,
"testRecordingTags": ["regression", "critical-path"],
"error": null,
"pages": [
"https://www.bstackdemo.com/"
]
},
{
...
},
.
.
],
"pagination": {
"has_next": true,
"next_page": "eyJhbGciOiJIUzI1NiJ9.eyJwYWdlIjoxLCJwYWdlX3NpemUiOjEwLCJidWlsZF91dWlkIjoic3pkdGplMnhsaHNydWZkajF3bnJnYnZndnNmZzJjdGRsdWt4Nnl5eCIsImV4cCI6MTczNjY4NDA1OH0.sLI7hWQwE_bB6AB-ORgz1K6D2VIHqH_H39qK8Jh3HqA"
}
}
-
id Integer
Unique ID of the test case.
-
name String
Name of the test case.
-
status String
The status of the test case.
-
time String
Timestamp of when the test case was run.
-
summary Object
▶ SHOW VALUESA brief summary of the metrics related to the test case.
-
pageCount Integer
Number of pages in the test case list.
-
componentCount Integer
Number of components that have issues highlighted.
-
severityBreakdown Object
▶ SHOW VALUESA split of issue count according to severity.
-
minor Integer
Number of minor issues.
-
serious Integer
Number of serious issues.
-
critical Integer
Number of critical issues.
-
moderate Integer
Number of moderate issues.
-
-
- Show 8 more
-
file String
Path to the file which houses the test cases.
-
osData Object
▶ SHOW VALUESDetails of the OS in which the test case was run.
-
name String
Name of the OS used.
-
version String
Version of the OS used.
-
logo Object
Brand name of the OS used.
-
-
browserData Object
▶ SHOW VALUESDetails of the browser in which the test case was run.
-
name String
Name of the browser used.
-
version String
Version of the browser used.
-
logo String
Brand name of the browser used.
-
-
tags String
Any tag associated with the test case.
-
testRecordingTags Array
Tags associated with the test recording linked to a test case. Returns an empty array if no recording exists. Available only for Low-Code/No-Code(LCNC) builds.
-
error String
Any error information associated with the test case.
-
pages Array
An array of URLs/pages on which the test case was run.
-
pagination Object
▶ SHOW VALUESContains information to facilitate fetching additional records if they exist.
-
has_next Boolean
True if there are more records to fetch. False if the current response is the last page of records.
-
next_page String
A reference to the next page. Pass this as a request parameter in the subsequent request as “next_page” to get the next page of records.
-
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.