Agent skill · software engineering · alirezarezvani
testrail
Use when syncing Playwright tests with TestRail ('testrail', 'sync test cases', 'push results to testrail', 'import from testrail').
Why this skill is useful
Adds executable scripts for syncing Playwright tests with TestRail, including importing test cases and pushing results, which are not available in public documentation.
What it needs
Requires playwright installed locally. Requires testrail account access. About 2k tokens when loaded. Last updated 2026-08-05. 23,939 stars on the source repository.
What this skill does
TestRail Integration Bidirectional sync between Playwright tests and TestRail test management. Prerequisites Environment variables must be set: TESTRAILURL — e.g., https://your-instance.testrail.io TESTRAILUSER — your email TESTRAILAPIKEY — 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 nodemodules). 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 Steps: 1. Call testrailgetcases 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 Steps: 1. Run Playwright tests with JSON reporter: 2. Parse results: map each test to its TestRail case ID (from annotations) 3. Call testrailaddresult MCP tool for each test: Pass → statusid: 1 Fail → statusid: 5, include error message Skip → statusid: 2 4. Report: X results pushed, Y passed, Z failed 3. Create Test Run Steps: 1. Call testrailaddrun MCP tool 2. Include all test case IDs found in Playwright test annotations 3. Return run ID for result pushing 4. Sync Status Steps: 1. Fetch test cases from TestRail 2. Scan local Playwright tests for TestRail annotations 3. Report coverage: 5. Update Test Cases in TestRail Steps: 1. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills alirezarezvani/testrail--a72a5c