---
title: "List test runs"
method: GET
path: "/api/v1/user/projects/{projectId}/test-runs"
tags: ["User Projects"]
---

# List test runs

`GET /api/v1/user/projects/{projectId}/test-runs`

## Request

- Base URL: `https://app.gaffer.sh`
- URL: `https://app.gaffer.sh/api/v1/user/projects/{projectId}/test-runs`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in header `X-API-Key`
  - HTTP bearer

Lists test runs for a specific project with pagination and filtering.
Returns summary data (excludes full test results for performance).

## Path parameters

- `projectId` string, required

## Query parameters

- `limit` integer
- `offset` integer
- `branch` string
- `framework` string
- `commitSha` string
- `status` 'passed' | 'failed'

## Response `200`

Paginated list of test runs

- object
  - `testRuns` TestRunSummary[]
    - `id` string, required
    - `uniqueId` string, required: Deduplication key for idempotent uploads (format: sessionId:filename)
    - `sourceFile` string, nullable: Original filename from the uploaded report
    - `branch` string, nullable
    - `commitSha` string, nullable
    - `framework` string, nullable: Detected test framework (e.g., playwright, vitest, jest, junit, pytest, rspec, ctrf, trx)
    - `tags` object, nullable
    - `summary` TestSummary, required
      - `passed` integer, required
      - `failed` integer, required
      - `skipped` integer, required
      - `total` integer, required
      - `durationMs` integer, nullable: Total duration in milliseconds
    - `createdAt` string, date-time, required
  - `pagination` Pagination
    - `limit` integer, required
    - `offset` integer, required
    - `total` integer, required
    - `hasMore` boolean, required

## Other responses

- `400`: Invalid request parameters
- `401`: Missing or invalid API key
- `404`: Resource not found

---

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