New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Sync tests with TestRail

TestRail Integration

by alirezarezvani · MIT license · ★ 26,349 on GitHub · updated Aug 30

TestRail Integration cover

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

---
name: "testrail"
description: >-
  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".
---

# TestRail Integration

Bidirectional sync between Playwright tests and TestRail test management.

## Prerequisites

Environment variables must be set:
- `TESTRAIL_URL` — e.g., `https://your-instance.testrail.io`
- `TESTRAIL_USER` — your email
- `TESTRAIL_API_KEY` — API key from TestRail

Overview

Bidirectional sync between Playwright tests and TestRail test management.

What you get

  • Operation summary with counts
  • Any errors or unmatched cases
  • Link to TestRail run/results
Manual install (npx, ZIP)
Claude Codenpx skills add alirezarezvani/claude-skills --skill testrail -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \ | tar -xz -C ~/.claude/skills --strip-components=4 claude-skills-19392f7a0826/engineering-team/playwright-pro/skills/testrail
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/8dec8cedb74bb8878888/testrail.zip" -OutFile "$env:TEMP\testrail.zip"; Expand-Archive "$env:TEMP\testrail.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.8 KB
Read the files here
alirezarezvani/19392f71 file
Shared references2SKILL.md reads these from elsewhere in the repo. Not in the ZIP.Get them on GitHub ↗
SKILL.md
Show the full text138 lines

TestRail Integration

Bidirectional sync between Playwright tests and TestRail test management.

Prerequisites

Environment variables must be set:

  • TESTRAIL_URL — e.g., https://your-instance.testrail.io
  • TESTRAIL_USER — your email
  • TESTRAIL_API_KEY — API key from TestRail

If not set, inform the user how to configure them and stop.

The TestRail MCP server is not auto-registered (issue #978). pw-testrail was removed from the plugin's .mcp.json because it failed to connect for every user (the plugin ships no node_modules). The testrail_* MCP tools used below, and the /pw:testrail command, will fail with "tool not found" until it is enabled manually — see the Integrations section of the plugin's CLAUDE.md (cd integrations/testrail-mcp && npm install, then register the server in your own user/project MCP config). Setting the env vars alone is not sufficient.

Capabilities

1. Import Test Cases → Generate Playwright Tests
/pw:testrail import --project <id> --suite <id>

Steps:

  1. Call testrail_get_cases MCP tool to fetch test cases
  2. For each test case:
    • Read title, preconditions, steps, expected results
    • Map to a Playwright test using appropriate template
    • Include TestRail case ID as test annotation: test.info().annotations.push({ type: 'testrail', description: 'C12345' })
  3. Generate test files grouped by section
  4. Report: X cases imported, Y tests generated
2. Push Test Results → TestRail
/pw:testrail push --run <id>

Steps:

  1. Run Playwright tests with JSON reporter:
    npx playwright test --reporter=json > test-results.json
    
  2. Parse results: map each test to its TestRail case ID (from annotations)
  3. Call testrail_add_result MCP tool for each test:
    • Pass → status_id: 1
    • Fail → status_id: 5, include error message
    • Skip → status_id: 2
  4. Report: X results pushed, Y passed, Z failed
3. Create Test Run
/pw:testrail run --project <id> --name "Sprint 42 Regression"

Steps:

  1. Call testrail_add_run MCP tool
  2. Include all test case IDs found in Playwright test annotations
  3. Return run ID for result pushing
4. Sync Status
/pw:testrail status --project <id>

Steps:

  1. Fetch test cases from TestRail
  2. Scan local Playwright tests for TestRail annotations
  3. Report coverage:
    TestRail cases: 150
    Playwright tests with TestRail IDs: 120
    Unlinked TestRail cases: 30
    Playwright tests without TestRail IDs: 15
    
5. Update Test Cases in TestRail
/pw:testrail update --case <id>

Steps:

  1. Read the Playwright test for this case ID
  2. Extract steps and expected results from test code
  3. Call testrail_update_case MCP tool to update steps

MCP Tools Used

Tool When
testrail_get_projects List available projects
testrail_get_suites List suites in project
testrail_get_cases Read test cases
testrail_add_case Create new test case
testrail_update_case Update existing case
testrail_add_run Create test run
testrail_add_result Push individual result
testrail_get_results Read historical results

Test Annotation Format

All Playwright tests linked to TestRail include:

test('should login successfully', async ({ page }) => {
  test.info().annotations.push({
    type: 'testrail',
    description: 'C12345',
  });
  // ... test code
});

This annotation is the bridge between Playwright and TestRail.

Output

  • Operation summary with counts
  • Any errors or unmatched cases
  • Link to TestRail run/results
1---
2name: "testrail"
3description: >-
4 Sync tests with TestRail. Use when user mentions "testrail", "test management",
5 "test cases", "test run", "sync test cases", "push results to testrail",
6 or "import from testrail".
7---
8 
9# TestRail Integration
10 
11Bidirectional sync between Playwright tests and TestRail test management.
12 
13## Prerequisites
14 
15Environment variables must be set:
16- `TESTRAIL_URL` — e.g., `https://your-instance.testrail.io`
17- `TESTRAIL_USER` — your email
18- `TESTRAIL_API_KEY` — API key from TestRail
19 
20If not set, inform the user how to configure them and stop.
21 
22> **The TestRail MCP server is not auto-registered (issue #978).** `pw-testrail`
23> was removed from the plugin's `.mcp.json` because it failed to connect for every
24> user (the plugin ships no `node_modules`). The `testrail_*` MCP tools used below,
25> and the `/pw:testrail` command, will fail with "tool not found" until it is
26> enabled manually — see the **Integrations** section of the plugin's `CLAUDE.md`
27> (`cd integrations/testrail-mcp && npm install`, then register the server in your
28> own user/project MCP config). Setting the env vars alone is not sufficient.
29 
30## Capabilities
31 
32### 1. Import Test Cases → Generate Playwright Tests
33 
34```
35/pw:testrail import --project <id> --suite <id>
36```
37 
38Steps:
391. Call `testrail_get_cases` MCP tool to fetch test cases
402. For each test case:
41 - Read title, preconditions, steps, expected results
42 - Map to a Playwright test using appropriate template
43 - Include TestRail case ID as test annotation: `test.info().annotations.push({ type: 'testrail', description: 'C12345' })`
443. Generate test files grouped by section
454. Report: X cases imported, Y tests generated
46 
47### 2. Push Test Results → TestRail
48 
49```
50/pw:testrail push --run <id>
51```
52 
53Steps:
541. Run Playwright tests with JSON reporter:
55 ```bash
56 npx playwright test --reporter=json > test-results.json
57 ```
582. Parse results: map each test to its TestRail case ID (from annotations)
593. Call `testrail_add_result` MCP tool for each test:
60 - Pass → status_id: 1
61 - Fail → status_id: 5, include error message
62 - Skip → status_id: 2
634. Report: X results pushed, Y passed, Z failed
64 
65### 3. Create Test Run
66 
67```
68/pw:testrail run --project <id> --name "Sprint 42 Regression"
69```
70 
71Steps:
721. Call `testrail_add_run` MCP tool
732. Include all test case IDs found in Playwright test annotations
743. Return run ID for result pushing
75 
76### 4. Sync Status
77 
78```
79/pw:testrail status --project <id>
80```
81 
82Steps:
831. Fetch test cases from TestRail
842. Scan local Playwright tests for TestRail annotations
853. Report coverage:
86 ```
87 TestRail cases: 150
88 Playwright tests with TestRail IDs: 120
89 Unlinked TestRail cases: 30
90 Playwright tests without TestRail IDs: 15
91 ```
92 
93### 5. Update Test Cases in TestRail
94 
95```
96/pw:testrail update --case <id>
97```
98 
99Steps:
1001. Read the Playwright test for this case ID
1012. Extract steps and expected results from test code
1023. Call `testrail_update_case` MCP tool to update steps
103 
104## MCP Tools Used
105 
106| Tool | When |
107|---|---|
108| `testrail_get_projects` | List available projects |
109| `testrail_get_suites` | List suites in project |
110| `testrail_get_cases` | Read test cases |
111| `testrail_add_case` | Create new test case |
112| `testrail_update_case` | Update existing case |
113| `testrail_add_run` | Create test run |
114| `testrail_add_result` | Push individual result |
115| `testrail_get_results` | Read historical results |
116 
117## Test Annotation Format
118 
119All Playwright tests linked to TestRail include:
120 
121```typescript
122test('should login successfully', async ({ page }) => {
123 test.info().annotations.push({
124 type: 'testrail',
125 description: 'C12345',
126 });
127 // ... test code
128});
129```
130 
131This annotation is the bridge between Playwright and TestRail.
132 
133## Output
134 
135- Operation summary with counts
136- Any errors or unmatched cases
137- Link to TestRail run/results
138 
View all files on GitHub →

Details

Updated
Aug 30, 2026
License
MIT
Stars on the repo
★ 26,349
Checked
Source
alirezarezvani/claude-skills ↗
Creator
alirezarezvani · 363 listings
View creator

Similar skills

See all →
SkillTests in real browsers via Chrome DevTools MCPBrowser testing with devtoolsaddyosmani/agent-skills · by addyosmaniTests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.★ 98.7k GitHub starsMCPThis MCP server attempts to exercise all the featuresEverything MCP Servermodelcontextprotocol/servers · by modelcontextprotocolThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test…★ 90.5k GitHub starsMCPA Model Context Protocol server that provides web contentFetch MCP Servermodelcontextprotocol/servers · by modelcontextprotocolA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content…★ 90.5k GitHub starsMCPNode.js server implementing Model Context ProtocolFilesystem MCP Servermodelcontextprotocol/servers · by modelcontextprotocolNode.js server implementing Model Context Protocol (MCP) for filesystem operations.★ 90.5k GitHub starsSkillAbout libraries, frameworks, API referencesContext7 MCPupstash/context7 · by upstashThis skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.★ 62.3k GitHub starsSkillUses Chrome DevTools via MCP for efficient debuggingChromeDevTools/chrome-devtools-mcp · by ChromeDevToolsUses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to `--slim` mode (MCP configuration).★ 52.4k GitHub stars

More from alirezarezvani

SkillResume a paused experiment/ar:ar-resume — Resume Experimentalirezarezvani/claude-skills · by alirezarezvaniResume a paused experiment. Checkout the experiment branch, read results history, continue iterating. Use when the user runs /ar:ar-resume or asks to pick up a previously started autoresearch experiment.★ 26.3k GitHub starsSkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboardalirezarezvani/claude-skills · by alirezarezvaniShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.★ 26.3k GitHub starsSkillStart an autonomous experiment loop with user-selected/ar:loop — Autonomous Experiment Loopalirezarezvani/claude-skills · by alirezarezvaniStart an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling. Use when the user runs /ar:loop or asks to run an autoresearch experiment continuously on a schedule.★ 26.3k GitHub starsSkillRun a single experiment iteration/ar:run — Single Experiment Iterationalirezarezvani/claude-skills · by alirezarezvaniRun a single experiment iteration. Edit the target file, evaluate, keep or discard. Use when the user runs /ar:run or asks for one manual autoresearch iteration.★ 26.3k GitHub starsSkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experimentalirezarezvani/claude-skills · by alirezarezvaniSet up a new autoresearch experiment interactively. Collects domain, target file, eval command, metric, direction, and evaluator. Use when the user runs /ar:setup or asks to start optimizing a file with the autoresearch loop.★ 26.3k GitHub starsSkill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberationalirezarezvani/claude-skills · by alirezarezvani/cs:boardroom <brief> — 6-phase multi-role deliberation across the C-suite with Phase 2 isolation, critic pre-screen, and synthesis. Outputs a board memo. Use when a decision spans multiple executive domains — e.g. a pricing change touching finance, positioning, and product, or a raise-vs-cut runway call.★ 26.3k GitHub stars