---
title: "Add multiple test cases in batch using suite token authentication"
method: POST
path: "/unit-tests/sessions/{sessionId}/cases/batch"
tags: ["Unit Test API"]
---

# Add multiple test cases in batch using suite token authentication

`POST /unit-tests/sessions/{sessionId}/cases/batch`

Authentication: Include the suite token in the header: `Authorization: Bearer <suite_token>`

## Path parameters

- `sessionId` string, required

## Request body

- AddCasesRequest
  - `cases` AddTestCaseRequest[], required
    - `name` string, required — Name of the test case
    - `test_group_name` string, required — Name of the test group this case belongs to (typically corresponds to a test suite in JUnit XML)
    - `classname` string, required — Fully qualified class name of the test
    - `status` 'PASSED' | 'FAILED' | 'SKIPPED' | 'ERROR', required — Test execution status
    - `time` number, double, required — Execution time in seconds
    - `data` string — Original XML data from the test report

## Response `201`

- TestCasesView
  - `url` string — API endpoint to GET this object
  - `html_url` string — Web URL to view this object in Buddy.works
  - `cases` ShortTestCaseView[]
    - `url` string — API endpoint to GET this object
    - `html_url` string — Web URL to view this object in Buddy.works
    - `id` string — Unique identifier of the test case
    - `name` string — Name of the test case
    - `test_group_name` string — Name of the test group this case belongs to (typically corresponds to a test suite in JUnit XML)
    - `test_group_id` string — ID of the test group this case belongs to
    - `classname` string — Fully qualified class name of the test
    - `status` 'PASSED' | 'FAILED' | 'SKIPPED' | 'ERROR' — Test execution status
    - `time` number, double — Execution time in seconds

---

[API](https://skmtc.net/buddy/apis/buddy-api.md) · [All operations](https://skmtc.net/buddy/apis/buddy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/buddy/buddy-api/versions/2426d67c249a/schema)
