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

# Get the test results of a repository pipeline run

> The test reports the run's steps declared with test_results and what became of each, the tests by outcome across them, and the failed, flaky and slowest tests. Requires pipelines.read. Read-only.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json get /api/v1/org/pipeline-repositories/{repository_id}/pipeline-runs/{run_id}/tests
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
tags:
  - name: Organisation IAM
    description: >-
      Custom organisation roles and scoped role assignments for member and
      service-account identities.
  - name: Clusters
    description: Create, inspect and manage clusters, and the stacks deployed on them.
  - name: Managed Clusters
    description: Provider-managed control planes, driven through one common surface.
  - name: Imported Clusters
    description: Clusters that already existed and were connected to Ankra.
  - name: Cluster Access
    description: Kubeconfigs, service-account tokens and per-cluster access grants.
  - name: Kubernetes
    description: Read and act on the Kubernetes objects inside a cluster.
  - name: AWS Clusters
    description: >-
      Provision and manage self-managed k3s / kubeadm clusters on AWS EC2 in
      your own VPC.
  - name: Ankra Cloud Clusters
    description: >-
      Provision and manage self-managed kubeadm / k3s clusters on Ankra Cloud
      servers: a private network, a NAT router and a bastion per cluster.
  - name: DigitalOcean Clusters
    description: Provision and manage DigitalOcean Kubernetes clusters.
  - name: Hetzner Clusters
    description: Provision and manage Hetzner Kubernetes clusters.
  - name: OVH Clusters
    description: Provision and manage OVH Kubernetes clusters.
  - name: Scaleway Clusters
    description: Provision and manage Scaleway Kapsule clusters.
  - name: UpCloud Clusters
    description: Provision and manage UpCloud Kubernetes clusters.
  - name: Applications
    description: Deploy, configure and observe applications across the fleet.
  - name: Pipelines
    description: >-
      Pipeline definitions, the approval of the authority they declare, and the
      caches pipelines keep between runs.
  - name: Deploy Targets
    description: >-
      Environments, the hosts registered to receive deployments, and the
      releases deployed to them.
  - name: Backups
    description: >-
      Backup vaults, restore points, protection posture and captures for stacks
      and application deployments; a completed capture is not a verified
      restore.
  - name: Stack Profiles
    description: Reusable stack definitions, their versions and sharing.
  - name: Services
    description: >-
      Versioned service packages and explicit sharing. Runtime admission is
      separate from publication.
  - name: Charts
    description: Browse the chart catalogue behind stacks and addons.
  - name: Helm
    description: Helm registries, credentials and the charts they expose.
  - name: Executions
    description: Long-running platform executions and their jobs.
  - name: Operations
    description: Cancel in-flight cluster operations and their jobs.
  - name: Chat
    description: Conversational sessions, plans and confirmable actions.
  - name: AI Management
    description: >-
      Customer agent lifecycle, authenticated identity and organisation
      automation controls.
  - name: AI Agent Runs
    description: Autonomous agent runs and their outcomes.
  - name: AI Tickets
    description: The AI ticket board, its sync connections and settings.
  - name: AI Playbooks
    description: Reusable playbooks the AI lanes execute.
  - name: AI Conditions
    description: Conditions that gate AI autonomy.
  - name: AI Remediation
    description: >-
      The organisation's auto-remediation policy: what the AI lanes may fix by
      themselves, and who approves the rest.
  - name: AI Engineering Handoffs
    description: Work the AI lanes escalate to a human engineer.
  - name: AI Environment
    description: The environment and base stacks AI demos deploy into.
  - name: Security
    description: Findings, advisories, SBOMs, compliance and posture.
  - name: Cost
    description: Cluster and fleet cost, rate cards and cost settings.
  - name: Decisions
    description: >-
      The decision ledger behind the Security and Cost queues: proposals a
      surface computed, the approve and set-aside decisions people took on them,
      and the receipts of running them.
  - name: Usage
    description: >-
      What your organisation used of Ankra - vCPU-hours, playgrounds, managed
      services, hosted logs and metrics, and AI - per meter and period, with how
      completely it was measured and whether a published rate applies.
  - name: Billing
    description: Subscription and spend caps.
  - name: Organisation
    description: Members, invitations, audit logs and organisation settings.
  - name: Account
    description: >-
      Your own account: the contact email Ankra mails when it differs from your
      sign-in address.
  - name: Account Tokens
    description: Personal access tokens for the API and CLI.
  - name: Credentials
    description: The shared credential store.
  - name: AWS Credentials
    description: >-
      AWS credentials: access keys or CloudFormation-onboarded STS roles for
      cost, EKS and self-managed provisioning.
  - name: Ankra Cloud Credentials
    description: >-
      Ankra Cloud API tokens, shared by the self-managed and managed Ankra Cloud
      lanes.
  - name: Azure Credentials
    description: Azure credentials and SSH keys.
  - name: DigitalOcean Credentials
    description: DigitalOcean credentials and SSH keys.
  - name: Hetzner Credentials
    description: Hetzner credentials and SSH keys.
  - name: OVH Credentials
    description: OVH credentials and SSH keys.
  - name: Scaleway Credentials
    description: Scaleway credentials.
  - name: UpCloud Credentials
    description: UpCloud credentials and SSH keys.
  - name: Data Source Credentials
    description: Credentials for metrics and log sources.
  - name: DNS Credentials
    description: Credentials for DNS providers.
  - name: Object Storage Buckets
    description: >-
      Buckets Ankra creates and manages on an organisation's own provider
      credentials.
  - name: DNS
    description: DNS zones and records, including custom organisation zones.
  - name: Cloudflare
    description: Cloudflare domains and the credentials behind them.
  - name: Avura
    description: >-
      The linked Avura organization, the domains it shares with Ankra Platform,
      and their DNS records.
  - name: Variables
    description: Organisation- and cluster-scoped variables.
  - name: SOPS
    description: Encrypt and decrypt values with the organisation SOPS config.
  - name: Alerts
    description: Alert integrations and ingest credentials.
  - name: Notifications
    description: Notification routes and their delivery targets.
  - name: Support
    description: Support tickets.
  - name: AI Settings
    description: Organisation AI provider, model catalog and per-function model settings
paths:
  /api/v1/org/pipeline-repositories/{repository_id}/pipeline-runs/{run_id}/tests:
    get:
      tags:
        - Pipelines
      summary: Get the test results of a repository pipeline run
      description: >-
        The test reports the run's steps declared with test_results and what
        became of each, the tests by outcome across them, and the failed, flaky
        and slowest tests. Requires pipelines.read. Read-only.
      operationId: getPipelineRepositoryRunTestsToken
      parameters:
        - name: repository_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: slowest
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 50
            default: 10
          description: How many of the slowest tests to list.
      responses:
        '200':
          description: The run's test results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineTestSummary'
        '401':
          description: Authentication required
        '403':
          description: Missing pipelines.read
        '404':
          description: No such run, or no such pipeline repository in the organisation
        '422':
          description: Malformed id or slowest
        '500':
          description: Internal error
      security:
        - BearerAuth: []
components:
  schemas:
    PipelineTestSummary:
      type: object
      additionalProperties: false
      required:
        - run_id
        - has_reports
        - counts
        - duration_ms
        - is_truncated
        - reports
        - failed
        - flaky
        - slowest
      properties:
        run_id:
          type: string
          format: uuid
        has_reports:
          type: boolean
          description: >-
            False when the run's steps declared no test report, which is not the
            same as every test passing.
        counts:
          $ref: '#/components/schemas/PipelineTestCounts'
        duration_ms:
          type: integer
          minimum: 0
        is_truncated:
          type: boolean
          description: A report's tests were capped, or a list hit 500 entries.
        reports:
          type: array
          items:
            $ref: '#/components/schemas/PipelineTestReport'
        failed:
          type: array
          items:
            $ref: '#/components/schemas/PipelineTestCase'
        flaky:
          type: array
          items:
            $ref: '#/components/schemas/PipelineTestCase'
        slowest:
          type: array
          items:
            $ref: '#/components/schemas/PipelineTestCase'
    PipelineTestCounts:
      type: object
      additionalProperties: false
      required:
        - total
        - passed
        - failed
        - skipped
        - flaky
      description: >-
        Tests by outcome. flaky is a test that failed and then passed on a
        retry.
      properties:
        total:
          type: integer
          minimum: 0
        passed:
          type: integer
          minimum: 0
        failed:
          type: integer
          minimum: 0
        skipped:
          type: integer
          minimum: 0
        flaky:
          type: integer
          minimum: 0
    PipelineTestReport:
      type: object
      additionalProperties: false
      required:
        - artifact_id
        - report_id
        - step_id
        - stage
        - format
        - status
        - error_message
        - counts
        - duration_ms
        - stored_count
        - is_truncated
        - is_superseded
      properties:
        artifact_id:
          type: string
          format: uuid
        report_id:
          type:
            - string
            - 'null'
          format: uuid
        step_id:
          type:
            - string
            - 'null'
          format: uuid
        stage:
          type: string
        format:
          type: string
          enum:
            - junit
            - pytest
            - playwright
            - go-test
        status:
          type: string
          enum:
            - ingested
            - unreadable
            - pending
            - not_uploaded
            - expired
          description: >-
            ingested: read. unreadable: uploaded but not a report Ankra can
            read. pending: not uploaded or not read yet. not_uploaded: never
            reached the vault. expired: removed by retention before it was read.
        error_message:
          type: string
          description: >-
            Why the report is unreadable or was not uploaded, or which files of
            a directory could not be read.
        counts:
          $ref: '#/components/schemas/PipelineTestCounts'
        duration_ms:
          type: integer
          minimum: 0
        stored_count:
          type: integer
          minimum: 0
          description: >-
            How many of the report's tests are stored; failed and flaky ones are
            kept first.
        is_truncated:
          type: boolean
        is_superseded:
          type: boolean
          description: >-
            A later attempt of the same step declared the same report; this one
            does not count.
    PipelineTestCase:
      type: object
      additionalProperties: false
      required:
        - test_key
        - suite
        - name
        - file
        - outcome
        - duration_ms
        - attempts
        - failure_message
        - step_id
        - stage
      properties:
        test_key:
          type: string
          description: >-
            The test's stable identity across runs: the hex SHA-256 of its
            suite, name and file. Pass it to the history route.
        suite:
          type: string
        name:
          type: string
        file:
          type: string
        outcome:
          type: string
          enum:
            - passed
            - failed
            - skipped
            - flaky
        duration_ms:
          type: integer
          minimum: 0
          description: Time spent across every attempt.
        attempts:
          type: integer
          minimum: 1
        failure_message:
          type: string
          description: >-
            The first failure, at most 2000 characters, with credentials
            redacted. Empty for a passed or skipped test.
        step_id:
          type:
            - string
            - 'null'
          format: uuid
        stage:
          type: string
  securitySchemes:
    BearerAuth:
      bearerFormat: PAT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.