> ## 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.

# Linear Integration

> Create Linear issues from failed or flaky Playwright tests in TestDino.

export const VideoSchema = ({name, description, thumbnailUrl, uploadDate, duration, contentUrl, embedUrl}) => {
  const schema = {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    name,
    description,
    thumbnailUrl,
    uploadDate,
    ...duration ? {
      duration
    } : {},
    ...contentUrl ? {
      contentUrl
    } : {},
    ...embedUrl ? {
      embedUrl
    } : {},
    publisher: {
      "@type": "Organization",
      name: "TestDino",
      logo: {
        "@type": "ImageObject",
        url: "https://docs.testdino.com/logo/light.svg"
      }
    }
  };
  return <script type="application/ld+json" dangerouslySetInnerHTML={{
    __html: JSON.stringify(schema)
  }} />;
};

<VideoSchema name="Linear Integration with TestDino" description="How to create Linear issues from failed or flaky Playwright test runs in TestDino." thumbnailUrl="https://i.ytimg.com/vi/M7Hg4TpjOM8/maxresdefault.jpg" uploadDate="2025-12-16T00:00:00+00:00" contentUrl="https://www.youtube.com/watch?v=M7Hg4TpjOM8" embedUrl="https://www.youtube.com/embed/M7Hg4TpjOM8" />

The Linear integration creates prefilled issues in Linear directly from failed or flaky tests in TestDino. Each issue includes the test name, error details, failure history, code context, console output, screenshots, and links to the TestDino run and Git commit.

This is a **user-level** integration. Each team member connects their own Linear account and creates issues under their own identity.

<Warning>
  **Warning**

  Available on TestDino **Team** and **Enterprise** plans.
</Warning>

<iframe className="w-full rounded-lg h-[500px]" src="https://www.youtube.com/embed/M7Hg4TpjOM8" title="Linear integration demo" frameBorder="0" allow="accelerometer;  clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; embedding" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen />

## Prerequisites

* A TestDino project with test runs uploaded ([Getting Started](/getting-started))
* A Linear account with permission to create issues
* A Linear team to file issues into

## Connect Linear to TestDino

### 1. Open the Integrations page

Go to **Settings → Integrations** in your TestDino project. Find the **Linear** card and click **Connect**.

<img src="https://tdstorageus.blob.core.windows.net/public/docs/integrations/issue-tracking/linear/integration-issuetracking-unconnected.webp" alt="TestDino Settings → Integrations page showing all issue tracking cards with Connect buttons" />

### 2. Authorize your Linear account

TestDino redirects you to Linear to authorize access. Sign in and approve the request. TestDino requests permission to read workspaces, teams, and create issues.

### 3. Configure defaults

After authorization, select the default **Workspace** and **Team** where issues will be created. You can change these per issue when creating a bug report.

<img src="https://tdstorageus.blob.core.windows.net/public/docs/integrations/issue-tracking/linear/integration-linear-connected.webp" alt="Linear connected configuration in TestDino showing default workspace selector, sync, and disconnect options" style={{ maxWidth:"50%" }} />

<Note>
  **Note**

  The default team is a convenience setting. You can select a different team each time you create an issue.
</Note>

## Create a Linear Bug Report

Create Linear issues directly from failed or flaky test cases. Each issue includes test metadata, so your team has full context without opening separate reports.

<Steps>
  <Step title="Open a Test Run">
    Navigate to a **Test Run** in TestDino.
  </Step>

  <Step title="Select a test case">
    Choose a failed or flaky **test case** from the run.
  </Step>

  <Step title="Raise Issue">
    Click **Raise Issue** and select **Linear**.

    <img src="https://tdstorageus.blob.core.windows.net/public/docs/integrations/issue-tracking/linear/integration-raiseissue-button.webp" alt="Raise Issue button showing connected issue tracking integrations to select from" />
  </Step>

  <Step title="Configure & Create issue">
    Select the **Workspace** and **Team**. Set **Issue Type**, **Priority**, **Labels**, and **Assignee** as needed. Review the **Summary** and **Description** (auto-generated from failure data). Use the **Write/Preview** toggle to verify formatting. Click **Create** to file the issue in Linear.

    <img src="https://tdstorageus.blob.core.windows.net/public/docs/integrations/issue-tracking/linear/after-you-create-the-issue.webp" alt="Linear issue confirmation showing issue key, ID, and link" style={{ maxWidth:"70%" }} />
  </Step>

  <Step title="Confirm creation">
    TestDino shows a confirmation with the Linear issue key and internal ID with a copyable URL. Click **View in Linear** to open the issue and continue triage.

    <img src="https://tdstorageus.blob.core.windows.net/public/docs/integrations/issue-tracking/linear/bug-report.webp" alt="Linear bug report form in TestDino showing prefilled fields and description" style={{ maxWidth:"70%" }} />
  </Step>
</Steps>

## What TestDino Pre-fills

Every issue is created with structured context so the developer receiving it has everything needed to investigate.

| Section           | Field                | Pre-filled Content                                                           |
| :---------------- | :------------------- | :--------------------------------------------------------------------------- |
| **Linear Fields** | Workspace and Team   | Default from Settings is preselected                                         |
|                   | Issue Type           | Linear issue types                                                           |
|                   | Priority             | Linear priority values                                                       |
|                   | Labels               | Optional routing labels                                                      |
|                   | Assignee             | Optional routing assignee                                                    |
|                   | Summary              | Title based on test name with run context                                    |
| **Description**   | Test Details         | File, branch, commit author/message, environment, run ID, duration, attempts |
|                   | Why It Failed        | Failure cluster and the exact step or locator                                |
|                   | Last Attempt Snippet | Short code context around the failing line                                   |
|                   | Recent History       | Failure frequency in the selected period                                     |
|                   | Console Tail         | Recent relevant console output lines                                         |
|                   | Links                | TestDino run, Git commit, CI job                                             |
| **Review**        | Write/Preview        | Verify formatting before submitting                                          |
|                   | Screenshots          | Listed thumbnails; attach more if needed                                     |

## Troubleshooting

<AccordionGroup>
  <Accordion title="Teams or labels not showing in the form" icon="list">
    * Click **Sync** on the Linear card in **Settings → Integrations** to refresh teams, labels, and templates from Linear
    * Verify your Linear account has access to the workspace and team you expect to see
  </Accordion>

  <Accordion title="Authorization failed or expired" icon="lock">
    * TestDino automatically refreshes OAuth tokens when supported by the provider. If you still see authorization errors, click **Disconnect** on the Linear card, then reconnect and re-authorize
    * Ensure your Linear account has permission to create issues in the target team
  </Accordion>

  <Accordion title="Create Bug Report button not visible" icon="bug">
    * The button appears on failed or flaky test cases inside a test run detail view. Open a test run and click into a specific failed test
    * Verify the Linear integration is connected for your account in **Settings → Integrations**
  </Accordion>

  <Accordion title="Issue created but formatting looks wrong" icon="circle-exclamation">
    * Use the **Write/Preview** toggle in the bug report form to verify markdown formatting before submitting
    * Linear renders markdown in issue descriptions. Complex code blocks may need manual adjustment
  </Accordion>
</AccordionGroup>
