get_issue_test_coverage
Generate a traceability report listing every linked test case for a Jira issue with its last execution. Limits distinct cases with maxCases and can skip last results.
Instructions
Traceability report for a Jira issue: every linked test case with its latest execution (GET /issuelink/{issueKey}/testcases, then GET /testcase/{key} and GET /testcase/{key}/testresult/latest per case). Costs up to 2 requests per case, so maxCases (integer 1..200, default 50) caps the volume. totalLinked counts LINKS — the API returns one entry per link, so a case linked to the issue twice is counted twice — while cases[] holds one row per DISTINCT case, expanded once. The order the API supplies is not stable between calls, so which cases survive the maxCases cut may vary; the cap is applied AFTER duplicate links are collapsed, so it counts DISTINCT cases. lastResult is { status, environment?, actualEndDate?, executedBy?, comment? } with the absent keys OMITTED, and it carries no execution id/key (use get_latest_result_for_test_case when you need the id). It is the most recently CREATED execution, not the one with the greatest actualEndDate, so a back-dated execution still wins and the date shown may be older than that of a suppressed one. lastResult null means no latest execution could be resolved — never executed, or its test run was deleted — not "untested" by itself; with includeLastResults=false (it defaults to true) the key is absent entirely. Fault-tolerant: a case that cannot be read still appears with its key. An issue with no linked cases returns totalLinked 0 and an empty cases[]; an issue key that does not exist raises 404 (Jira resolves issue keys case-insensitively, and issueKey is echoed back exactly as passed). note is present only when something was truncated or collapsed. Returns { issueKey, totalLinked, returned, note?, cases: [{ key, name, status, lastResult? }] }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | Jira issue key, e.g. PROJ-123 | |
| maxCases | No | Maximum number of DISTINCT linked cases to expand, integer 1..200 (default 50) | |
| includeLastResults | No | Fetch the latest execution of each case (default true); false skips those reads and omits lastResult from every row |