Back to Skills

testrail

Sync tests with TestRail. Use when user mentions "testrail", "test management", "test cases", "test run", "sync test cases", "push results to testrail", or "import from testrail".

24,417stars3,431forksUpdated 8/14/2026

Security Assessment

Safe(92/100)
Security Score92/100

About testrail

TestRail is an integration skill that provides bidirectional synchronization between Playwright automated tests and the TestRail test-management platform. It solves the common gap between where tests live (code) and where test outcomes are tracked (TestRail), letting teams import managed test cases into runnable Playwright specs, push execution results back to TestRail runs, and keep coverage in sync without manual copying.

The skill exposes five capabilities driven through `/pw:testrail` commands: importing TestRail cases and generating annotated Playwright tests, running tests with the JSON reporter and pushing pass/fail/skip results to a run, creating new test runs, reporting coverage status (linked vs unlinked cases), and updating TestRail case steps from test code. The bridge between the two systems is a Playwright test annotation carrying the TestRail case ID (for example `C12345`). Operations are performed via documented TestRail MCP tools such as `testrail_get_cases`, `testrail_add_result`, `testrail_add_run`, and `testrail_update_case`.

It targets QA engineers and developers running Playwright suites who use TestRail for test management and want to automate result reporting and case-to-test linkage. Prerequisites are three environment variables (`TESTRAIL_URL`, `TESTRAIL_USER`, `TESTRAIL_API_KEY`); if they are unset the skill instructs the user to configure them and stops. It is a single SKILL.md describing the workflow and MCP tool mapping rather than a standalone client.

FAQ

What integration does this skill provide?

A bidirectional sync between Playwright tests and TestRail: import cases into generated tests, push run results back, create runs, check coverage, and update case steps from code.

What are the prerequisites?

Three environment variables must be set: TESTRAIL_URL, TESTRAIL_USER (your email), and TESTRAIL_API_KEY. If they are missing the skill tells you how to configure them and stops.

How are Playwright tests linked to TestRail cases?

Each linked test pushes an annotation of type 'testrail' with the case ID as its description (for example C12345). That annotation is the bridge used for pushing results and reporting coverage.

How are results mapped when pushed?

Tests are run with the JSON reporter, then each result is sent via testrail_add_result: pass maps to status_id 1, fail to 5 (with the error message), and skip to 2.

Does it need special TestRail tooling?

Yes, it calls TestRail MCP tools such as testrail_get_cases, testrail_add_run, testrail_add_result, and testrail_update_case, which must be available in the environment.

Install testrail

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill