本文へ移動
cccskills
無料GitHub で公開

tcm-case-management

Test case management (TCM) across the five major platforms - TestRail, Xray, Zephyr Scale, Allure TestOps, and Qase - one tool-agnostic workflow for pre-execution case authoring and repository management: create and update cases, organise suites / sections / folders, attach structured steps with per-step expected results, link cases to requirements (Jira / Linear / GitHub), bulk import from CSV / JSON with idempotent re-runs, and sync from CI. The body works the workflow end to end against TestRail's API v2; references/ carries the per-vendor API specifics (auth model, endpoints, steps shape, enums, rate limits) for all five tools. Use for test case management in any of the five TCMs - authoring cases from a spec, bulk-importing legacy cases, migrating between tools, or mass-editing a case repository. Do NOT use for posting test-run results (pass/fail): result sync is the qa-test-reporting plugin's *-integration surface.

日本語の概要は準備中です。原文の説明を表示しています。

testland/qaスター 13(GitHub 13 + cccskills 0)
連携ツールJiraGitHubCloudflare

実行スコア 未検証

インストール方法を見る

含まれるファイル(7)

  • SKILL.md13.1 KB
  • .tessl-plugin/plugin.json1.0 KB
  • references/allure-testops.md8.3 KB
  • references/qase-io.md9.5 KB
  • references/testrail.md3.3 KB
  • references/xray.md8.4 KB
  • references/zephyr-scale.md8.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

tcm-case-management

Overview

Every mainstream TCM stores the same canonical case anatomy (test-case-anatomy-reference: identifier, objective, preconditions, steps, expected results, traceability) under different field names, containers, and auth models. The workflow is identical across tools:

  1. Authenticate with the platform's token scheme.
  2. Create the container hierarchy (suite / section / folder).
  3. Create cases with structured steps (one action + one expected result per step).
  4. Discover tenant-specific enums (types, priorities, custom fields) at runtime.
  5. Link cases to requirements for traceability.
  6. List with pagination; bulk-import with idempotency and verification.
  7. Sync from CI.

This skill works that workflow end to end using TestRail (the largest install base) as the primary example, then routes the per-vendor API deltas to references/.

Differentiation vs result sync: this skill operates on the case repository - create, update, organise, traceability - a strictly pre-execution concern. Posting test-run results (pass/fail, status updates) is the qa-test-reporting plugin's test-management-sync / test-management-sync / test-management-sync surface.

When to use

  • Creating cases from a spec / requirement / acceptance criterion.
  • Bulk-importing legacy cases from CSV / Excel.
  • Migrating between TCM instances or tools (see also tcm-migration-agent).
  • Programmatic case updates (mass-edit type, priority, tags).
  • Case-repository quality scans (pair with test-case-quality-critic).

Vendor routing table

VendorReferenceAuthCase containerSteps shapeDistinctive feature
TestRailreferences/testrail.mdHTTP Basic (email + API key)project → suite → sectioncustom_steps_separated array (Steps template)Template system (Steps / Text / Exploratory); refs free-text requirement links
Xray (Jira)references/xray.mdOAuth client credentials → JWT (separate from Jira auth)Jira issue with issuetype: TestGraphQL steps (action / data / result)Manual / Cucumber / Generic test types; .feature import; preconditions as linked issues
Zephyr Scale (Jira)references/zephyr-scale.mdBearer token (per-user)project → folderseparate /teststeps endpoint, OVERWRITE / APPEND modesFolder hierarchy per entity type; Jira-native links
Allure TestOpsreferences/allure-testops.mdBearer tokenproject → suite + layer + featurenested scenario.steps (sub-steps)Links automated allure-results back to manual cases (@allure.testcase)
Qasereferences/qase-io.mdToken header (not Authorization)project → suiteflat steps array (action / expected_result / data)Shared steps reused across cases; inverted priority enum (1=High)

Each reference carries the vendor's auth setup, create / update / list code, bulk-import loop, migration field map, response shapes, rate limits, and anti-patterns.

The workflow, worked with TestRail

TestRail organises tests as cases inside sections inside suites inside projects. The API v2 covers full CRUD on each plus templates, custom fields, references, and types. Authentication is HTTP Basic with email + API key per the TestRail support docs (support.testrail.com/hc/en-us/articles/7077871398036-Cases - Cloudflare-protected, cite by stable URL).

Step 1 - Authenticate

export TR_BASE="https://your-tenant.testrail.io"
export TR_EMAIL="you@company.com"
export TR_KEY="<api-key-from-user-profile>"
import requests, base64, os, json

auth = base64.b64encode(
    f"{os.environ['TR_EMAIL']}:{os.environ['TR_KEY']}".encode()
).decode()
HEADERS = {
    "Authorization": f"Basic {auth}",
    "Content-Type": "application/json",
}
BASE = os.environ["TR_BASE"]

def api(path, method="GET", body=None):
    url = f"{BASE}/index.php?/api/v2/{path.lstrip('/')}"
    r = requests.request(method, url, headers=HEADERS,
                         data=json.dumps(body) if body else None)
    r.raise_for_status()
    return r.json()

Step 2 - Create a case with structured steps

POST /index.php?/api/v2/add_case/:section_id:

def create_case(section_id, title, template_id=1, type_id=1, priority_id=2,
                preconditions=None, steps=None, refs=None):
    """
    template_id: 1=Steps, 2=Text, 3=Exploratory
    type_id: per project - discover via get_case_types
    priority_id: 1=Low, 2=Medium, 3=High, 4=Critical (default project enum)
    steps: list of {"content": "Action", "expected": "Outcome"}
    refs: comma-separated requirement IDs (e.g., "REQ-123,REQ-124")
    """
    body = {
        "title": title,
        "template_id": template_id,
        "type_id": type_id,
        "priority_id": priority_id,
    }
    if preconditions:
        body["custom_preconds"] = preconditions
    if steps and template_id == 1:
        body["custom_steps_separated"] = steps
    if refs:
        body["refs"] = refs
    return api(f"add_case/{section_id}", method="POST", body=body)

steps = [
    {"content": "Navigate to /login", "expected": "Login form rendered"},
    {"content": "Enter alice@example.com + correct password",
     "expected": "Submit button enabled"},
    {"content": "Click Submit",
     "expected": "Redirected to /dashboard within 2 s"},
]
new_case = create_case(
    section_id=42,
    title="Login with valid credentials redirects to dashboard",
    template_id=1,
    steps=steps,
    preconditions="User `alice@example.com` exists; password set to 'pw123'.",
    refs="REQ-AUTH-001",
)
print(new_case["id"])  # e.g., 1234

One action per step, each paired with its expected result - the per-step result tracking is why steps go in the structured field, never a text blob.

Step 3 - Discover tenant enums at runtime

Each tenant defines its own custom fields, case types, and priorities; discover their IDs at runtime rather than hard-coding them:

fields = api("get_case_fields")   # system_name, label, type_id per field
types = api("get_case_types")     # id + name per case type
prios = api("get_priorities")     # id + name per priority
type_ids = {t["name"]: t["id"] for t in types}
prio_ids = {p["name"]: p["id"] for p in prios}

This discovery step exists in every vendor: Zephyr's statusName / priorityName enums are project-scoped, Allure TestOps layers / features are per-project, Qase types are configurable. Never hard-code the integers.

Step 4 - Update, get, and list with pagination

def update_case(case_id, **fields):
    return api(f"update_case/{case_id}", method="POST", body=fields)

update_case(1234, refs="REQ-AUTH-001,REQ-AUTH-002")  # bulk re-tag

case = api(f"get_case/1234")
# List with pagination:
cases = []
offset = 0
while True:
    page = api(f"get_cases/{project_id}&suite_id={suite_id}"
               f"&limit=250&offset={offset}")
    cases.extend(page.get("cases", page) if isinstance(page, dict) else page)
    if isinstance(page, dict) and page.get("size", 0) < 250:
        break
    offset += 250

Newer TestRail versions return {"offset", "limit", "size", "_links", "cases": [...]}; older return a bare array. Handle both. Every vendor paginates differently (Zephyr isLast, Allure last, Qase entities < limit) - see the references.

Step 5 - Bulk import from CSV, idempotently

Build name-to-id maps once, then inside the loop check for an existing case by title before create so re-runs stay idempotent. get_cases accepts filter (substring match on title):

import csv

created, skipped = [], []
for row in csv.DictReader(open("legacy-cases.csv")):
    title = row["title"]
    existing = api(f"get_cases/{project_id}&suite_id={suite_id}"
                   f"&filter={requests.utils.quote(title[:60])}")
    if existing.get("cases"):
        skipped.append((title, existing["cases"][0]["id"]))
        continue  # already present; skip and log
    steps = [
        {"content": s, "expected": e}
        for s, e in zip(row["steps"].split("|"), row["expected"].split("|"))
    ]
    case = create_case(
        section_id=int(row["section_id"]),
        title=title,
        template_id=1,
        type_id=type_ids[row["type"]],
        priority_id=prio_ids[row["priority"]],
        preconditions=row.get("preconditions"),
        steps=steps,
        refs=row.get("refs"),
    )
    created.append(case["id"])

Verify: assert len(created) + len(skipped) equals the row count before declaring the import done; a shortfall means a row raised - inspect it, fix the source row, and re-run (already-created cases are skipped by the title check). On rate-limited vendors (Xray, Zephyr, Qase throttle around 60 req/min) add a time.sleep(1) per row and back off further on 429.

Step 6 - CI sync

Sync cases from a tests/ directory layout. One pattern: each spec file has front-matter declaring the case ID; on PR merge, post updates back:

- name: Sync test cases to TestRail
  env:
    TR_BASE: ${{ vars.TR_BASE }}
    TR_EMAIL: ${{ vars.TR_EMAIL }}
    TR_KEY: ${{ secrets.TR_KEY }}
  run: python scripts/sync-testrail.py

Have the sync script exit non-zero when any case fails to sync, and verify the repository case count matches the source count after the run - a mismatch means a silent partial sync.

Parsing results

Create responses return the full case object (id, created_on, updated_on, ...). Permalink:

url = f"{BASE}/index.php?/cases/view/{case_id}"

Per-vendor response shapes and permalink formats are in each reference.

Anti-patterns (cross-vendor)

Anti-patternWhy it failsFix
Hard-coded type / priority / status IDsEnums differ per project and tenantDiscover at runtime (Step 3)
Steps as a single text blobPer-step results unavailableUse the structured steps field (Step 2)
Plain title with no requirement refsCoverage reports show 0% requirement coverageAlways link cases to requirement IDs
Creating cases in the root containerHard to find later; organisation chaosAlways pick a section / folder / suite; create as needed
No pagination on list endpointsMisses cases beyond the first pageLoop per the vendor's pagination contract (Step 4)
Storing API keys in codeToken leakEnvironment variable / CI secret store
Bulk-create without throttling or idempotency429s; duplicate cases on re-runRate-limit + title-check pattern (Step 5)
Vendor-specific case structure as the authoring sourceMigration cost explodedAuthor in the canonical anatomy (test-case-anatomy-reference); let the tracker mapping be additive

Limitations

  • Vendor docs behind Cloudflare. All five vendors' API docs require browser validation; this skill cites by stable URL. Authenticated API calls work fine (different surface).
  • Custom-field discipline varies. Tenants define different custom fields; scripts must discover field IDs at runtime.
  • Requirement refs are only as valid as the reconciliation. Most TCMs don't validate that referenced IDs exist in the tracker; pair with traceability-matrix-builder.
  • Bulk operations are mostly sequential. Only Xray has a true bulk endpoint; elsewhere loop + throttle.
  • Cloud APIs only. The references cover each vendor's cloud API; Server / Data Center variants (Xray DC, Zephyr DC) have divergent REST shapes.

References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Builds a CI gate that fails the build on **new** WCAG / a11y violations introduced by a PR while grandfathering pre-existing violations on a per-rule / per-page baseline. Aggregates verdicts from axe-core / pa11y / Lighthouse a11y / WAVE / IBM Equal Access scans. Use when a project has accumulated a11y debt and a strict "zero violations" gate would block every PR - the ratchet pattern lets the team ship while preventing regressions.

日本語の概要は準備中です。原文の説明を表示しています。

testland/qa132026年10月20日 更新

Workflow skill that builds an A/B-test validity checklist from an experiment proposal, walking the canonical design-correctness gates - pre-registered OEC/power/guardrails, randomization unit + SRM check, assignment integrity, telemetry, peeking discipline, novelty/primacy, post-experiment SRM re-check - into a per-experiment checklist + sign-off form. Use when launching, auditing, or governing an experiment. For pitfall mechanics (guardrails, peeking) see experiment-results-interpreter's references; to read an already-valid result use experiment-results-interpreter; for per-SDK harness tests use experiment-sdk-testing - this gates DESIGN, not SDK code.

日本語の概要は準備中です。原文の説明を表示しています。

testland/qa132026年10月20日 更新

The single install-flow skill: the reference contract for the PWA install flow (installability gate fields, `beforeinstallprompt` handshake, per-platform paths - Android WebAPK / iOS Share menu / Firefox no-op - and the `display-mode` post-install signal, in references/install-flow-reference.md) plus the build-an-X workflow that emits the Add-to-Home-Screen suite. Walks the four-stage timeline, emitting one test per gate cell per [web.dev/articles/install-criteria][install-criteria], the deferred-prompt → `prompt()` → `userChoice` chain per [web.dev/articles/customize-install][customize-install], the iOS Safari manual-metadata branch (`apple-touch-icon`) per [web.dev/learn/pwa/installation][learn-pwa], and the post-install `(display-mode: standalone)` MQ assertion. Output: a Playwright spec with per-stage cells plus a coverage matrix. Use when a PWA's manifest, icons, or install handler change, when install conversion drops at an unknown stage, or when triaging a flaky install assertion.

日本語の概要は準備中です。原文の説明を表示しています。

testland/qa132026年10月20日 更新

Build-an-X workflow that uses an LLM to map existing tests to spec sections - given a spec doc + the test suite, the LLM identifies which tests cover which sections, surfaces uncovered sections (gap), and recommends specific tests to add. Output is a coverage matrix per spec ID. Scope is mapping tests that already exist and naming the gaps, not authoring tests for new acceptance criteria. Use when a spec doc and a test suite both exist but nobody can say which requirements are actually covered - before a release sign-off, an audit, or a decision about where to spend the next round of test effort.

日本語の概要は準備中です。原文の説明を表示しています。

testland/qa132026年10月20日 更新

Generates tests from natural-language specs (acceptance criteria, user stories, requirements) using an LLM, with confidence scoring per test case (LLM self-assessment plus heuristics: assertion quality, naming, completeness), batching uncertain cases for human review, and integration with the team's existing test framework. Use when the user asks to generate unit tests from acceptance criteria, convert user stories to test cases, automate test creation from requirements, or augment a spec-driven test suite with AI-generated stubs that are then curated before merge.

日本語の概要は準備中です。原文の説明を表示しています。

testland/qa132026年10月20日 更新

Configures Allure Report (test-runner adapter install, `allure-results` directory wiring, `categories.json` for failure classification, `history-trend.json` retention via the copy-history-between-runs pattern), runs the Allure CLI to convert `allure-results` to a static HTML site, and uploads the report as a CI artifact. Use when the team needs richer test reporting than JUnit XML - step-level attachments, per-test history, retry tracking, and severity / epic / feature labeling across framework-agnostic adapters (pytest, Jest, JUnit, TestNG, NUnit, Mocha). As a rich static HTML report generator, it is the open-source alternative to the sunset ExtentReports (JVM/.NET per-test HTML narrative); for hosted cross-run flakiness analytics rather than a static per-run report use currents-integration.

日本語の概要は準備中です。原文の説明を表示しています。

testland/qa132026年10月20日 更新

testland のスキルをすべて見る

このスキルの問題を報告する