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

# TestRail

> Pull your TestRail test cases into the QA.tech AI chat

The TestRail integration lets the [AI Chat Assistant](/core-concepts/ai-chat-assistant) read your existing TestRail test cases, so you can explore them and turn them into QA.tech tests without re-authoring anything by hand.

<Note>
  **Authentication:** TestRail uses an email + API key (HTTP Basic auth). Your
  API key is stored encrypted and is never shown again after saving.
</Note>

## Before you start

Enable the API and generate a key in TestRail:

<Steps>
  <Step title="Enable the TestRail API">
    In TestRail, go to **Administration → Site Settings → API** and turn on
    **Enable API**. This requires TestRail administrator access.
  </Step>

  <Step title="Create an API key">
    Click your avatar → **My Settings → API Keys → Add Key**, then copy the
    generated key — TestRail shows it only once. See the [TestRail API
    docs](https://support.testrail.com/hc/en-us/articles/7077039051284-Accessing-the-TestRail-API)
    for details.
  </Step>
</Steps>

## Setup

<Steps>
  <Step title="Open the TestRail integration">
    Go to **Settings → Integrations** in your project and select **TestRail**.
  </Step>

  <Step title="Enter your credentials">
    Fill in:

    * **Instance URL** — your TestRail address, e.g. `https://yourco.testrail.io`
    * **Account email** — the email the API key belongs to
    * **API key** — the key you generated above

    Then click **Connect TestRail**.
  </Step>

  <Step title="Test the connection">
    Click **Test connection** to confirm QA.tech can reach your instance — it
    reports how many projects it can see.
  </Step>
</Steps>

<Note>
  Your TestRail instance must be reachable over **https** on a public address.
  Internal-only / private-network instances are not supported.
</Note>

## Using TestRail in chat

Once connected, ask the [AI Chat Assistant](/core-concepts/ai-chat-assistant) to
work with your TestRail cases. It can:

* **List your TestRail projects** to find the right one
* **List test cases** in a project, suite, or section (paginated for large projects)
* **Fetch a case in full**, including its steps and preconditions
* **Turn a TestRail case into a QA.tech test**

> "List our TestRail projects"

> "Show the test cases in the Checkout suite"

> "Open TestRail case C1234 and create an equivalent QA.tech test"

<Tip>
  For multi-suite projects, tell the assistant which suite you mean (or ask it
  to list the suites first) so it can scope the cases correctly.
</Tip>

## Removing the integration

To disconnect, open **Settings → Integrations → TestRail** and click **Remove**.
This deletes the stored credentials, including your API key. Test cases you have
already imported into QA.tech are not affected.
