---
title: "Get the test results of a build"
method: GET
path: "/apps/{app-slug}/builds/{build-slug}/test-results"
tags: ["builds"]
---

# Get the test results of a build

`GET /apps/{app-slug}/builds/{build-slug}/test-results`

## Request

- Base URL: `https://api.bitrise.io/v0.1`
- URL: `https://api.bitrise.io/v0.1/apps/{app-slug}/builds/{build-slug}/test-results`
- Auth: API key in header `Authorization`

Get the test suites and test cases a finished build reported, with their status, duration and failure message. Requires a plan that includes test reports. With any filter or `limit`, test suites without matching test cases are left out; the counts of a test suite always cover all of its test cases.

## Path parameters

- `app-slug` string, required
- `build-slug` string, required

## Query parameters

- `status` string[]
- `suite` string
- `class_name` string
- `flaky` boolean
- `sort_by` 'duration' | 'name' | 'status'
- `sort_order` 'asc' | 'desc'
- `limit` integer

## Response `200`

OK

- ServiceDtoBuildTestResultsRespModel
  - `test_suites` ServiceDtoTestSuite[]
    - `attachments` ServiceDtoTestAttachment[]
      - `url` string
    - `duration_in_ms` integer
    - `error_count` integer
    - `failure_count` integer
    - `name` string
    - `properties` ServiceDtoTestProperty[]
      - `key` string
      - `value` string
    - `skipped_count` integer
    - `test_cases` ServiceDtoTestCase[]
      - `attachments` ServiceDtoTestAttachment[]
        - `url` string
      - `class_name` string
      - `duration_in_ms` integer
      - `flaky` boolean: Whether the test case is flaky
      - `message` string: Failure or error message of the test case
      - `name` string
      - `properties` ServiceDtoTestProperty[]
        - `key` string
        - `value` string
      - `runs` ServiceDtoTestRun[]: Individual runs of the test case when it was retried
        - `attachments` ServiceDtoTestAttachment[]
          - `url` string
        - `duration_in_ms` integer
        - `message` string
        - `name` string
        - `status` 'passed' | 'failed' | 'skipped' | 'error'
      - `status` 'passed' | 'failed' | 'skipped' | 'error'
      - `test_suites` string[]: Names of the test suites the test case originally belonged to
    - `test_count` integer
    - `test_suites` ServiceDtoTestSuite[]: Nested test suites

## Other responses

- `400`: Bad request - the build is not finished yet, or a filter value is invalid
- `401`: Unauthorized - no valid personal access token or workspace API token
- `403`: Forbidden - the plan of the workspace does not include test reports
- `404`: Not found - build does not exist, or user is not authorized
- `502`: Bad gateway - the test results could not be fetched, try again later

## Changes

- **2026-11-05** `859a161f2622`: 7 info
  - added the new optional `query` request parameter `class_name`
  - added the new optional `query` request parameter `flaky`
  - added the new optional `query` request parameter `limit`
  - added the new optional `query` request parameter `sort_by`
  - …3 more
- **2026-10-27** `1b2672007b11`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bitrise/apis/bitrise-api/changes/apps/:app-slug/builds/:build-slug/test-results/get.md)

---

[API](https://skmtc.dev/bitrise/apis/bitrise-api.md) - [All operations](https://skmtc.dev/bitrise/apis/bitrise-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bitrise/apis/bitrise-api/revisions/859a161f2622?raw)
