Skip to main content
No Result Found

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

GET https://api-accessibility.browserstack.com/api/automated-tests/v1/builds/{thBuildId}/test-cases

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,
            "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

    A brief summary of the metrics related to the test case.

    SHOW VALUES
    • pageCount Integer

      Number of pages in the test case list.

    • componentCount Integer

      Number of components that have issues highlighted.

    • severityBreakdown Object

      A split of issue count according to severity.

      SHOW VALUES
      • minor Integer

        Number of minor issues.

      • serious Integer

        Number of serious issues.

      • critical Integer

        Number of critical issues.

      • moderate Integer

        Number of moderate issues.

  • file String

    Path to the file which houses the test cases.

  • osData Object

    Details of the OS in which the test case was run.

    SHOW VALUES
    • name String

      Name of the OS used.

    • version String

      Version of the OS used.

    • logo Object

      Brand name of the OS used.

  • browserData Object

    Details of the browser in which the test case was run.

    SHOW VALUES
    • 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.

  • 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

    Contains information to facilitate fetching additional records if they exist.

    SHOW VALUES
    • 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.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Download Copy Check Circle