> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tester.army/llms.txt
> Use this file to discover all available pages before exploring further.

# Get run JUnit XML report

> Download a single run as a one-case JUnit XML report, in the same shape as the batch report. Returns 409 until the run has finished unless `allowIncomplete=true` is set, and 422 for a group's preparation run, which is not a test case.



## OpenAPI

````yaml /openapi.json get /v1/runs/{id}/junit
openapi: 3.0.0
info:
  title: TestArmy API
  version: 1.0.0
  description: >-
    AI-powered browser automation API for QA testing. Automate web testing
    workflows using natural language prompts.
servers:
  - url: https://tester.army/api
    description: Production API server
security: []
paths:
  /v1/runs/{id}/junit:
    get:
      tags:
        - Test Runs
      summary: Get run JUnit XML report
      description: >-
        Download a single run as a one-case JUnit XML report, in the same shape
        as the batch report. Returns 409 until the run has finished unless
        `allowIncomplete=true` is set, and 422 for a group's preparation run,
        which is not a test case.
      parameters:
        - schema:
            type: string
            format: uuid
            description: Test run ID
          required: true
          description: Test run ID
          name: id
          in: path
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            description: Export an in-flight run; it renders as skipped
          required: false
          description: Export an in-flight run; it renders as skipped
          name: allowIncomplete
          in: query
      responses:
        '200':
          description: JUnit XML report (served as an attachment)
          content:
            application/xml:
              schema:
                type: string
                description: >-
                  JUnit XML document. One `testsuite` per group-run batch (named
                  after the group), one `testcase` per test. Passing runs have
                  no child element; a FAILED verdict is a `<failure>`; BLOCKED
                  verdicts, runs that crashed before a verdict, and runs that
                  finished without one are `<error>` (type `BLOCKED`, the run
                  error code, or `MISSING_VERDICT`); cancelled, planner-skipped,
                  and unfinished runs are `<skipped>`. Each testcase carries
                  `testerarmy_*` properties plus TestRail
                  `testrail_result_comment` and `testrail_result_step`
                  properties, and a `test_id` property when the test title
                  contains `[C123]`-style case ids, so `trcli parse_junit`
                  imports it directly.
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '404':
          description: Run not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '409':
          description: >-
            Conflict - The run is still queued or running; pass
            `allowIncomplete=true` to export as skipped
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '422':
          description: >-
            Unprocessable - The run is a preparation run and is not exported as
            a test case
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '429':
          description: Too Many Requests - Usage limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '504':
          description: Gateway Timeout - Test execution exceeded time limit
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key authentication using Bearer token format

````