testrail
Syncs Playwright tests with TestRail for unified test management. Imports test cases and pushes execution results automatically.
Install
mkdir -p .claude/skills/testrail && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6566" && unzip -o skill.zip -d .claude/skills/testrail && rm skill.zipInstalls to .claude/skills/testrail
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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".Key capabilities
- →Import TestRail cases into Playwright scripts
- →Push Playwright test execution results to TestRail
- →Create new test runs within TestRail
- →Report test coverage synchronization status
- →Update existing TestRail cases from Playwright code
How it works
The integration uses Playwright test annotations to map local tests to TestRail case IDs, enabling bidirectional data exchange via MCP tools.
Inputs & outputs
When to use testrail
- →Importing TestRail cases as Playwright tests
- →Pushing test run results to TestRail
- →Creating new test runs from Playwright
- →Synchronizing test status across platforms
About this skill
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.ioTESTRAIL_USER— your emailTESTRAIL_API_KEY— API key from TestRail
If not set, inform the user how to configure them and stop.
Capabilities
1. Import Test Cases → Generate Playwright Tests
/pw:testrail import --project <id> --suite <id>
Steps:
- Call
testrail_get_casesMCP tool to fetch test cases - 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' })
- Generate test files grouped by section
- Report: X cases imported, Y tests generated
2. Push Test Results → TestRail
/pw:testrail push --run <id>
Steps:
- Run Playwright tests with JSON reporter:
npx playwright test --reporter=json > test-results.json - Parse results: map each test to its TestRail case ID (from annotations)
- Call
testrail_add_resultMCP tool for each test:- Pass → status_id: 1
- Fail → status_id: 5, include error message
- Skip → status_id: 2
- Report: X results pushed, Y passed, Z failed
3. Create Test Run
/pw:testrail run --project <id> --name "Sprint 42 Regression"
Steps:
- Call
testrail_add_runMCP tool - Include all test case IDs found in Playwright test annotations
- Return run ID for result pushing
4. Sync Status
/pw:testrail status --project <id>
Steps:
- Fetch test cases from TestRail
- Scan local Playwright tests for TestRail annotations
- 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:
- Read the Playwright test for this case ID
- Extract steps and expected results from test code
- Call
testrail_update_caseMCP 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
When not to use it
- →Projects not using Playwright
- →Environments without TestRail API access
Prerequisites
Limitations
- →Requires specific test annotation format in Playwright code
- →Relies on JSON reporter output for result pushing
How it compares
This approach automates the synchronization of test results and case management, replacing manual status updates between testing frameworks and management platforms.
Compared to similar skills
testrail side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| testrail (this skill) | 1 | 5mo | Review | Intermediate |
| playwright-pro | 8 | 3mo | Review | Intermediate |
| browserstack | 1 | 5mo | Review | Beginner |
| verification-loop | 0 | 4mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by alirezarezvani
View all by alirezarezvani →You might also like
playwright-pro
alirezarezvani
Production-grade Playwright testing toolkit. Use when the user mentions Playwright tests, end-to-end testing, browser automation, fixing flaky tests, test migration, CI/CD testing, or test suites. Generate tests, fix flaky failures, migrate from Cypress/Selenium, sync with TestRail, run on BrowserStack. 55 templates, 3 agents, smart reporting.
browserstack
alirezarezvani
Run tests on BrowserStack. Use when user mentions "browserstack", "cross-browser", "cloud testing", "browser matrix", "test on safari", "test on firefox", or "browser compatibility".
verification-loop
tom237ttkk
A comprehensive verification system for Codex work sessions.
frontend-mix-validate
coleam00
Run the full validation suite (install, type-check, lint, build, tests) on a freshly integrated app and fix anything broken. Run this skill in a Claude Code session driving Sonnet - validation is grind work, Sonnet is the right tool. Two-attempt cap per step; failures are recorded for the fix-valida
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
turborepo
vercel
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.