---
title: "Kiwi for TestRail"
description: "Have the agent on a Kiwi step upload its test results to a TestRail run with the TestRail CLI and return the run link as the step's output."
canonical: "https://kiwiflow.io/integrations/testrail"
---

# Kiwi for TestRail

Have the agent on a Kiwi step upload its test results to a TestRail run with the TestRail CLI and return the run link as the step's output.

- Your agent works in TestRail through its own connection. Kiwi does not call TestRail and never holds its credentials.
- A workflow skill can list TestRail among the tools it requires. When you supply your agent's available tools to a skill check and TestRail is not among them, the check reports `SK15-UNSUPPORTED-TOOL`.
- A project Admin can add links to TestRail, with notes, under Connections and bind them to the steps that use them. The agent reads them with `list_connections`.
- The agent can report the tools and plugins it ran with, including its TestRail connection, with `report_configuration`.
- The agent submits links to its work in TestRail as the step's outputs. People review them, and sign-off stays with the people your workflow names.

## What your agent can do in TestRail

- Upload a JUnit XML report to a new TestRail test run, or to an existing run by its ID, with `trcli parse_junit`.
- Match automated tests to the TestRail cases your team maintains through case IDs, such as C101 in the test name or a test_id property.
- Create a run for a suite, a milestone or a chosen set of case IDs, with references to the issues it covers, using `trcli add_run`.
- Upload Robot Framework and Cucumber results, and import or export Gherkin feature files, with the same CLI.
- Close the run after the upload with `--close-run`, or leave it open so testers can add manual results.

## Set up

### 1. Connect your agent to Kiwi

Add Kiwi's hosted MCP server, `https://kiwiflow.io/mcp`, to your coding agent.

- [Coding agents](https://kiwiflow.io/integrations#agent)
- [Quickstart](https://docs.kiwiflow.io/quickstart#connect-your-agent)

### 2. Connect your agent to TestRail

Install the TestRail command-line tool where your agent runs. The credentials stay with your agent.

```
pip install trcli
```

- [TestRail documentation](https://support.testrail.com/hc/en-us/articles/7146548750868-Getting-Started-with-the-TestRail-CLI)

### 3. Example skill

Publish instructions like these as a workflow skill that lists TestRail among its required tools.

```
Start from the assignment's TestRail project, suite ID and JUnit report path.
Upload the report with `trcli parse_junit` and match cases by their C-IDs.
Leave the run open; the assigned reviewer reads the results in TestRail.
Submit the TestRail run link and the passed and failed counts as outputs.
If the upload fails or cases do not match, stop after one corrected attempt
and report a blocker to the step owner with the trcli error message.
```

## More test management integrations

- [Kiwi for Xray](https://kiwiflow.io/integrations/xray.md): Have the agent on a Kiwi step import its automated test results into an Xray Test Execution in Jira through the Xray Cloud REST API.
- [Kiwi for Zephyr](https://kiwiflow.io/integrations/zephyr.md): Have the agent on a Kiwi step record test cycles and executions in Zephyr for a Jira issue through SmartBear's remote Zephyr MCP server.
- [Kiwi for Tricentis qTest](https://kiwiflow.io/integrations/qtest.md): Have the agent on a Kiwi step read requirements and write test cases in Tricentis qTest Manager through your qTest site's MCP server.
- [Kiwi for Qase](https://kiwiflow.io/integrations/qase.md): Have the agent on a Kiwi step find test cases and record test run results in Qase through Qase's hosted MCP server.
- [Kiwi for PractiTest](https://kiwiflow.io/integrations/practitest.md): Have the agent on a Kiwi step check requirement coverage and record test runs in PractiTest through PractiTest's MCP server.
- [Kiwi for BrowserStack Test Management](https://kiwiflow.io/integrations/browserstack-test-management.md): Have the agent on a Kiwi step write test cases, create test runs and log results in BrowserStack Test Management through BrowserStack's MCP server.
- [Kiwi for Testmo](https://kiwiflow.io/integrations/testmo.md): Have the agent on a Kiwi step submit its automated test results to a Testmo automation run with the Testmo CLI and return the run link.
- [Kiwi for Allure TestOps](https://kiwiflow.io/integrations/allure-testops.md): Have the agent on a Kiwi step run tests under allurectl so the results reach an Allure TestOps launch, and return the launch link.

- [Get started](https://kiwiflow.io/get-started)
- [Read the setup guide](https://docs.kiwiflow.io/other-tools)
