Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

test-management-sync

БесплатноБез исполняемых скриптовНе проверен

Use when CI test results must flow into TestRail, Xray for Jira or Zephyr Scale without manual copying. Maps tests to case IDs, opens a run per build, pushes…

testlandот testland★ 18 звёзд на GitHub

Об этом скилле

test-management-sync

Overview

Teams that manage test cases in a test management tool need automation result sync - without it, automated runs don't update the tool and the test-management view drifts from reality. The sync job has the same five-step shape across every vendor; only the auth model, the endpoints, and the case-ID scheme differ.

This skill wires that sync: the vendor-independent workflow below, TestRail as the worked example, and per-vendor API detail in references/.

Vendor routing

Vendor Shape Auth Results API Reference
TestRail (Gurock / Idera) Standalone TCM (not a Jira app) Basic (email + API key) add_run + batched add_results_for_cases references/testrail.md
Xray Jira app (Test / Test Execution issue types) Cloud: client_id+client_secret → 24h JWT; Server/DC: PAT /api/v2/import/execution/{junit,cucumber,nunit,testng,robot} references/xray.md
Zephyr Scale (SmartBear, formerly TM4J) Jira app (Test Cycles) Long-lived Bearer token POST /testexecutions (or bulk /automations/executions/junit) references/zephyr.md

Routing rules:

  • Test management is standalone TestRail → references/testrail.md.
  • Test management is a Jira app → Xray (references/xray.md) or Zephyr Scale (references/zephyr.md) - check which app the Jira instance has installed; Zephyr further disambiguates into Scale / Squad / Enterprise (the zephyr reference's variant table).
  • The team wants cross-run flakiness analytics, not case sync → currents-integration (different job entirely).

When to use

  • The team runs both manual and automated tests and the automated results need to land in the test management tool.
  • A CI pipeline must auto-create a run / execution / cycle per build and populate results so release management has the full picture.
  • The team manages test cases in the tool and wants per-case mapping back to the automated test (via case-ID labels in test names or annotations).

The push-results workflow (vendor-independent)

Every vendor sync follows the same five steps:

  1. Authenticate from CI secrets - never URL params, never logged (TestRail: Basic email+key; Xray Cloud: JWT exchange per run; Zephyr Scale: Bearer token).
  2. Map tests to case IDs - embed the vendor's case ID / issue key in the test name (test('adds to cart [C1234]')) or use an annotation (@XrayTest(key=...), @TestRailCase(id=...), @TestCaseKey(...)). Name-embedding is lowest-friction; either way the sync script must recover the ID from the result.
  3. Open a container per build - a TestRail Test Run, an Xray Test Execution, or a Zephyr Test Cycle - scoped to exactly the cases the automated suite covers, named <branch> · <sha-short>.
  4. Batch results back - one batched POST (or bounded-concurrency loop) rather than one call per test; every vendor has a rate limit that per-test posting trips on real suites.
  5. Close / finalize on main only - closed containers are read-only; PR runs stay open so flake-fix reruns can update them.

Run the sync as an if: always() CI step after the test step so failed runs still update the tool. The input is the runner's JUnit XML - parse it with junit-xml-analysis.

Worked example - TestRail

A Jest suite syncing one build to TestRail project 42, suite 7.

  1. Tests carry the case ID in the name (Step 2, name-embedding): test('can add to cart [C1234]', ...).
  2. Export credentials and run the suite to JUnit XML:
export TESTRAIL_HOST=https://acme.testrail.io
export [email protected]
export TESTRAIL_API_KEY=...            # My Settings > API Keys
npm test -- --reporters=jest-junit
  1. The sync script opens a run scoped to the covered cases (include_all: False + explicit case_ids - without this a 5,000-case project produces a 5,000-row run of empty cells), then batches the results in one POST:
run_id = open_run(42, 7, "main · a1b2c3d", [1234])   # add_run → Run ID
add_results(run_id, [                                 # add_results_for_cases (batch)
    {'case_id': 1234, 'status_id': 1, 'comment': 'green on CI', 'elapsed': '12s'},
])

status_id: 1 is Passed per the stock convention (1 Passed / 2 Blocked / 3 Untested / 4 Retest / 5 Failed) - but read get_statuses at script init and verify every ID in your map exists, because TestRail accepts unknown IDs and writes to the wrong status silently. Full script, per-result fields, and CI wiring: references/testrail.md.

  1. Open the run in TestRail to see C1234 marked Passed with the 12s elapsed time. Close the run only when this is the main build (Step 5).

For the same build against Xray the container is a Test Execution

Полный SKILL.md на GitHub

Установить test-management-sync в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.tessl-plugin/plugin.jsonreferences/testrail.mdreferences/xray.mdreferences/zephyr.md

FAQ

Что делает скилл test-management-sync?

Use when CI test results must flow into TestRail, Xray for Jira or Zephyr Scale without manual copying. Maps tests to case IDs, opens a run per build, pushes results in batches and closes runs on main only; vendor details are in its references.

Как установить скилл test-management-sync?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл test-management-sync запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить test-management-sync с