---
title: "Add a test result to a run"
method: POST
path: "/v1/runs/{run}/tests"
---

# Add a test result to a run

`POST /v1/runs/{run}/tests`

## Request

- Base URL: `https://api.proxymail.qa`
- URL: `https://api.proxymail.qa/v1/runs/{run}/tests`
- Auth: HTTP bearer

From a test runner's reporter: a failed or flaky test (its `name`, `status`, `duration_ms` and the start of its `error`), or the suite's `totals`. A failed test fails the run. Send failed and flaky tests one by one, then the totals; the report shows the totals at the top and each failed test with what its emails did.

## Path parameters

- `run` string, uuid, required

## Request body

- union
  - object
    - `name` string, required
    - `status` 'passed' | 'failed' | 'flaky' | 'skipped', required
    - `duration_ms` number
    - `error` string: Its first three lines are kept, up to 300 characters, without terminal colours.
  - object
    - `totals` object, required
      - `passed` integer
      - `failed` integer
      - `skipped` integer
      - `flaky` integer

## Response `204`

Added

## Other responses

- `400`: An error
- `404`: An error
- `409`: An error

---

[API](https://skmtc.dev/proxymail/apis/proxy-mail-qa-api.md) · [All operations](https://skmtc.dev/proxymail/apis/proxy-mail-qa-api/llms.txt) · [OpenAPI document](https://skmtc.dev/proxymail/apis/proxy-mail-qa-api/revisions/8f8a5e84cf5c?raw)
