testrail by alirezarezvani/claude-skills
npx skills add https://github.com/alirezarezvani/claude-skills --skill testrail实现 Playwright 测试与 TestRail 测试管理的双向同步。
必须设置以下环境变量:
TESTRAIL_URL — 例如 https://your-instance.testrail.ioTESTRAIL_USER — 您的邮箱TESTRAIL_API_KEY — TestRail 的 API 密钥如果未设置,请告知用户如何配置并停止操作。
/pw:testrail import --project <id> --suite <id>
步骤:
testrail_get_cases MCP 工具获取测试用例广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
test.info().annotations.push({ type: 'testrail', description: 'C12345' })/pw:testrail push --run <id>
步骤:
使用 JSON 报告器运行 Playwright 测试:
npx playwright test --reporter=json > test-results.json
解析结果:将每个测试映射到其 TestRail 用例 ID(从注解中获取)
为每个测试调用 testrail_add_result MCP 工具:
报告:推送了 X 个结果,Y 个通过,Z 个失败
/pw:testrail run --project <id> --name "Sprint 42 Regression"
步骤:
testrail_add_run MCP 工具/pw:testrail status --project <id>
步骤:
从 TestRail 获取测试用例
扫描本地 Playwright 测试中的 TestRail 注解
报告覆盖率:
TestRail 用例: 150
带有 TestRail ID 的 Playwright 测试: 120
未关联的 TestRail 用例: 30
没有 TestRail ID 的 Playwright 测试: 15
/pw:testrail update --case <id>
步骤:
testrail_update_case MCP 工具来更新步骤| 工具 | 使用时机 |
|---|---|
testrail_get_projects | 列出可用项目 |
testrail_get_suites | 列出项目中的测试套件 |
testrail_get_cases | 读取测试用例 |
testrail_add_case | 创建新测试用例 |
testrail_update_case | 更新现有用例 |
testrail_add_run | 创建测试运行 |
testrail_add_result | 推送单个结果 |
testrail_get_results | 读取历史结果 |
所有链接到 TestRail 的 Playwright 测试都包含:
test('should login successfully', async ({ page }) => {
test.info().annotations.push({
type: 'testrail',
description: 'C12345',
});
// ... 测试代码
});
此注解是 Playwright 和 TestRail 之间的桥梁。
每周安装量
50
代码仓库
GitHub 星标数
2.8K
首次出现
5 天前
安全审计
安装于
codex46
cursor45
gemini-cli45
github-copilot45
amp45
cline45
Bidirectional sync between Playwright tests and TestRail test management.
Environment variables must be set:
TESTRAIL_URL — e.g., https://your-instance.testrail.ioTESTRAIL_USER — your emailTESTRAIL_API_KEY — API key from TestRailIf not set, inform the user how to configure them and stop.
/pw:testrail import --project <id> --suite <id>
Steps:
testrail_get_cases MCP tool to fetch test casestest.info().annotations.push({ type: 'testrail', description: 'C12345' })/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_result MCP tool for each test:
Report: X results pushed, Y passed, Z failed
/pw:testrail run --project <id> --name "Sprint 42 Regression"
Steps:
testrail_add_run MCP tool/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
/pw:testrail update --case <id>
Steps:
testrail_update_case MCP tool to update steps| 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 |
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.
Weekly Installs
50
Repository
GitHub Stars
2.8K
First Seen
5 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex46
cursor45
gemini-cli45
github-copilot45
amp45
cline45
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
102,600 周安装
testrail_add_result | Push individual result |
testrail_get_results | Read historical results |