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

# TestDino CircleCI Orb Setup

> Upload Playwright results from CircleCI to TestDino using the official TestDino Orb. Single-step integration.

<Callout icon="book-open" color="#3B82F6">
  **What you'll learn**

  * How to upload Playwright results using the TestDino CircleCI Orb
  * Orb configuration options for HTML, full bundle, and custom paths
</Callout>

Set up CircleCI to upload Playwright test results to TestDino using the <a href="https://circleci.com/developer/orbs/orb/testdino/testdino" target="_blank" rel="noopener noreferrer">TestDino Orb <Icon icon="arrow-up-right-from-square" size={12} /></a> — a prebuilt package that wraps the TestDino CLI so you don't need to install it separately.

This guide covers orb configuration options for HTML uploads, full bundles, and custom paths.

<Tip>
  **Recommendation**

  For more configuration options and the latest features, use the [TestDino CLI approach](/guides/playwright-circle-ci-cli) instead. The Orb wraps the CLI but may not include all new updates immediately.
</Tip>

## Prerequisites

Before setting up, ensure you have:

* A <a href="https://app.testdino.com" target="_blank" rel="noopener noreferrer">TestDino account <Icon icon="arrow-up-right-from-square" size={12} /></a> with a project created
* A TestDino API key ([Generate API Keys](/guides/generate-api-keys))
* <a href="https://github.com/testdino-hq/TestDino-Example" target="_blank" rel="noopener noreferrer">TestDino Example Repository <Icon icon="arrow-up-right-from-square" size={12} /></a> for sample tests and ready-to-use CI configs
* A CircleCI account with access to your repository
* Playwright configured with JSON and HTML reporters in `playwright.config.js`:

```javascript playwright.config.js theme={null}
// ...existing config

reporter: [
  ['html', { outputDir: './playwright-report' }],  // Optional
  ['json', { outputFile: './playwright-report/report.json' }],  // ✅ Required
]
```

## Set Up Your API Key

1. Open your project in CircleCI
2. Go to **Project Settings → Environment Variables**
3. Click **Add Environment Variable**
4. Set the name to `TESTDINO_TOKEN`
5. Paste your TestDino API key as the value
6. Save the variable

<Warning>
  **Warning**

  Never commit your API key directly in config files. Always use environment variables.
</Warning>

## Basic Upload

<Accordion title=".circleci/config.yml — Basic upload">
  ```yaml .circleci/config.yml theme={null}
  version: '2.1'
  orbs:
    testdino: testdino/testdino@1.0.0
  jobs:
    run-tests:
      docker:
        - image: mcr.microsoft.com/playwright:v1.40.0-focal
      steps:
        - checkout
        - run:
            command: npm ci
            name: Install dependencies
        - run:
            command: npx playwright test
            name: Run Playwright tests
        - testdino/upload-report:
            report_directory: ./playwright-report
            token: TESTDINO_TOKEN
  workflows:
    test-and-upload:
      jobs:
        - run-tests
  ```
</Accordion>

## Upload with HTML Report

<Accordion title=".circleci/config.yml — Upload with HTML report">
  ```yaml .circleci/config.yml theme={null}
  version: '2.1'
  orbs:
    testdino: testdino/testdino@1.0.0
  jobs:
    upload-with-html:
      docker:
        - image: mcr.microsoft.com/playwright:v1.40.0-focal
      steps:
        - checkout
        - run:
            command: npm ci
            name: Install dependencies
        - run:
            command: npx playwright test
            name: Run Playwright tests
        - testdino/upload-report:
            report_directory: ./playwright-report
            token: TESTDINO_TOKEN
            upload_html: true
            verbose: true
        - store_artifacts:
            destination: playwright-report
            path: ./playwright-report
  workflows:
    test-with-testdino:
      jobs:
        - upload-with-html:
            context: testdino-credentials
  ```
</Accordion>

## Upload Full Bundle

Include all artifacts (JSON, images, videos) in one upload.

<Accordion title=".circleci/config.yml — Upload full bundle">
  ```yaml .circleci/config.yml theme={null}
  version: '2.1'
  orbs:
    testdino: testdino/testdino@1.0.0
  jobs:
    upload-full-bundle:
      docker:
        - image: mcr.microsoft.com/playwright:v1.40.0-focal
      steps:
        - checkout
        - run:
            command: npm ci
            name: Install dependencies
        - run:
            command: npx playwright test
            name: Run Playwright tests
        - testdino/upload-report:
            report_directory: ./playwright-report
            token: TESTDINO_TOKEN
            upload_full_json: true
            verbose: true
  workflows:
    test-with-testdino:
      jobs:
        - upload-full-bundle:
            context: testdino-credentials
  ```
</Accordion>

## Upload with Custom Paths

Specify custom report paths and include images and videos.

<Accordion title=".circleci/config.yml — Upload with custom paths">
  ```yaml .circleci/config.yml theme={null}
  version: '2.1'
  orbs:
    testdino: testdino/testdino@1.0.0
  jobs:
    upload-with-custom-paths:
      docker:
        - image: mcr.microsoft.com/playwright:v1.40.0-focal
      steps:
        - checkout
        - run:
            command: npm ci
            name: Install dependencies
        - run:
            command: npx playwright test
            name: Run Playwright tests
        - testdino/upload-report:
            report_directory: ./test-results
            json_report: ./test-results/results.json
            html_report: ./test-results/index.html
            token: TESTDINO_TOKEN
            upload_images: true
            upload_videos: true
  workflows:
    test-with-testdino:
      jobs:
        - upload-with-custom-paths:
            context: testdino-credentials
  ```
</Accordion>

## Orb Parameters

| Parameter          | Required | Description                                                     |
| :----------------- | :------- | :-------------------------------------------------------------- |
| `report_directory` | Yes      | Path to the Playwright report directory                         |
| `token`            | Yes      | CircleCI environment variable name holding the TestDino API key |
| `upload_html`      | No       | Upload HTML report (`true` / `false`)                           |
| `upload_full_json` | No       | Upload full JSON bundle with all artifacts                      |
| `upload_images`    | No       | Upload screenshot attachments                                   |
| `upload_videos`    | No       | Upload video recordings                                         |
| `json_report`      | No       | Custom path to JSON report file                                 |
| `html_report`      | No       | Custom path to HTML report file                                 |
| `verbose`          | No       | Enable verbose logging output                                   |

<Tip>
  **Tip**

  Use [CircleCI contexts](https://circleci.com/docs/contexts/) (e.g., `testdino-credentials`) to manage secrets across multiple jobs without repeating environment variable setup.
</Tip>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Orb not found or version error">
    Ensure the orb is imported correctly: `testdino: testdino/testdino@1.0.0`. Check the [CircleCI Orb Registry](https://circleci.com/developer/orbs/orb/testdino/testdino) for the latest version.
  </Accordion>

  <Accordion title="TESTDINO_TOKEN not found">
    Confirm the environment variable is set in **CircleCI → Project Settings → Environment Variables**. If using contexts, verify the job references the correct context name.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="CI Optimization" icon="gauge-high" href="/guides/playwright-ci-optimization">
    Reduce CI time with smart reruns
  </Card>

  <Card title="Branch Mapping" icon="code-branch" href="/platform/organizations/settings">
    Map branches to environments for organized test runs
  </Card>

  <Card title="Integrations" icon="puzzle-piece" href="/integrations/overview">
    Connect Slack, Jira, Linear, Asana, and more
  </Card>

  <Card title="TestDino MCP" icon="plug" href="/mcp/overview">
    Access test results and fix issues with AI agents
  </Card>
</CardGroup>
