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

# Get test case

> Get full details for a single test case, including its steps and expected outcomes. List test cases for the branch first to find test case IDs.



## OpenAPI

````yaml api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/testing/test-cases/{testCaseId}
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/branches/{branchId}/testing/test-cases/{testCaseId}:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: branchId
        in: path
        required: true
        schema:
          type: string
      - name: testCaseId
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Testing
      summary: Get test case
      description: >-
        Get full details for a single test case, including its steps and
        expected outcomes. List test cases for the branch first to find test
        case IDs.
      responses:
        '200':
          description: Test case details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestCasePublicResponse'
        '404':
          description: Test case not found
components:
  schemas:
    TestCasePublicResponse:
      type: object
      title: TestCasePublicResponse
      description: >-
        A simulation test case, including its scenario, assertions, and
        simulation history.
      properties:
        id:
          type: string
        name:
          type: string
        scenario:
          type: string
        assertions:
          type: array
          items:
            $ref: '#/components/schemas/TestCaseAssertion'
        variantId:
          type:
            - string
            - 'null'
        language:
          type: string
        channel:
          type: string
        tags:
          type: array
          items:
            type: string
        severity:
          type:
            - string
            - 'null'
          enum:
            - low
            - medium
            - high
            - critical
            - null
          description: Severity of a test case, ranging from low to critical
        simulatedAt:
          type:
            - string
            - 'null'
        callerNumber:
          type:
            - string
            - 'null'
        sipHeaders:
          type: object
          additionalProperties:
            type: string
        integrationAttributes:
          type: object
          additionalProperties: {}
        createdAt:
          type: string
        createdBy:
          type: string
        updatedAt:
          type: string
        updatedBy:
          type: string
      required:
        - id
        - name
        - scenario
        - assertions
        - variantId
        - language
        - channel
        - tags
        - severity
        - simulatedAt
        - callerNumber
        - sipHeaders
        - integrationAttributes
        - createdAt
        - createdBy
        - updatedAt
        - updatedBy
      additionalProperties: false
    TestCaseAssertion:
      type: object
      title: TestCaseAssertion
      description: >-
        A test case assertion: either a prompt the conversation must satisfy, or
        an expected function call.
      properties:
        payload:
          anyOf:
            - type: object
              properties:
                $case:
                  type: string
                  enum:
                    - prompt
                value:
                  type: object
                  properties:
                    value:
                      type: string
                  required:
                    - value
                  additionalProperties: false
              required:
                - $case
                - value
              additionalProperties: false
            - type: object
              properties:
                $case:
                  type: string
                  enum:
                    - functionCall
                value:
                  type: object
                  properties:
                    name:
                      type: string
                    arguments:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          valueType:
                            type: string
                          assertionType:
                            type: string
                          expectedValue:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                              - type: 'null'
                        required:
                          - valueType
                          - assertionType
                          - expectedValue
                        additionalProperties: false
                    isAsserted:
                      type: boolean
                  required:
                    - name
                    - arguments
                    - isAsserted
                  additionalProperties: false
              required:
                - $case
                - value
              additionalProperties: false
      required:
        - payload
      additionalProperties: false
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````