Syntic
← All skills
EngineeringFreeCommunityv1.0.0

testrail

Use when syncing Playwright tests with TestRail test management, importing test cases, pushing results, or managing test runs.

About this skill

Use when syncing Playwright tests with TestRail test management, importing test cases, pushing results, or managing test runs.

SKILL.md

testrail.SKILL.md

Place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review the contents and run it in a controlled environment first.

SKILL.md
---
name: testrail
description: Use when syncing Playwright tests with TestRail test management, importing test cases, pushing results, or managing test runs.
category: Engineering
version: 1.0.0
tools: []
---

# TestRail Integration

Bidirectional sync between Playwright tests and TestRail test management using MCP tools and TestRail APIs.

## Capabilities

### Import Test Cases → Generate Playwright Tests
Call `testrail_get_cases` to fetch test cases from TestRail, extract title/preconditions/steps/expected results, map each to a Playwright test template, and include TestRail case ID as test annotation: `test.info().annotations.push({ type: 'testrail', description: 'C12345' })`. Generate test files grouped by section and report: X cases imported, Y tests generated.

### Push Test Results → TestRail
Run Playwright tests with JSON reporter, parse results mapping each test to its TestRail case ID (from annotations), call `testrail_add_result` MCP tool for each: Pass → status_id: 1, Fail → status_id: 5 (include error message), Skip → status_id: 2. Report: X results pushed, Y passed, Z failed.

### Create Test Run
Call `testrail_add_run` MCP tool, include all test case IDs found in Playwright test annotations, return run ID for result pushing.

### Sync Status
Fetch test cases from TestRail, scan local Playwright tests for TestRail annotations, report coverage: TestRail cases total, Playwright tests with TestRail IDs, unlinked cases, Playwright tests without IDs.

### Update Test Cases
Read the Playwright test for a case ID, extract steps and expected results from test code, call `testrail_update_case` MCP tool to update.

## MCP Tools
- `testrail_get_projects`, `testrail_get_suites`, `testrail_get_cases`, `testrail_add_case`, `testrail_update_case`, `testrail_add_run`, `testrail_add_result`, `testrail_get_results`

## Test Annotation Format
```typescript
test('should login successfully', async ({ page }) => {
  test.info().annotations.push({
    type: 'testrail',
    description: 'C12345',
  });
});
```

Install

Syntic App

  1. 1Create a dedicated folder for this skill in your local skills library.
  2. 2Place SKILL.md into that folder.
  3. 3Restart Syntic and invoke this skill on matching tasks.

Syntic Code (CLI)

  1. 1Save SKILL.md in your local Syntic Code skills directory.
  2. 2Keep related files in the same skill folder.
  3. 3Run in a safe environment and validate outputs.