No slash command · from rosetta-light
Generates test cases from requirements, covering all requirement types with appropriate scenarios, merges redundant cases via parameterization, and builds a coverage matrix.
Ships in rosetta-light. Installing the plugin adds it to Claude Code.
<testgen_flow_test_case_generation>
<description_and_purpose> Generate comprehensive test cases from the requirements document, covering all requirement types with appropriate test scenarios. Merge redundant cases via parameterization, build coverage matrix. </description_and_purpose>
<workflow_context>
testgen-flowrequirements.md from Phase 4test-scenarios.md — test casesqa-knowledge (scenario_design mode + config-resolved TMS FORMAT binding)coding (for any tracked write outside the ticket folder; read repo standards as authority)<phase_steps>
<load_requirements step="5.1">
plans/testgen-{TICKET-KEY}/requirements.md<identify_test_types step="5.2"> For each requirement, determine test scenario types needed:
Scope guard: generate Performance and Security test types ONLY when the requirements / NFRs specify a constraint in that category — never invent injection / XSS / load tests without a source requirement (mirrors the Phase 4 NFR coverage-discipline: cover only what the sources specify, do not pad).
Common patterns for minimum coverage:
CRUD Operations (4+ scenarios):
Authentication (5+ scenarios):
API Calls (4+ scenarios):
<generate_test_cases step="5.3" subagent="engineer" role="Test case design engineer">
Resolve the TMS FORMAT provider first (merge evidence — do NOT hardcode the vendor): read the TMS provider from plans/testgen-{TICKET-KEY}/testgen-project-config.md (data sources / provider fields written by Phase 0, prefilled from gain.json sdlc.test_management(_project)), explicit user input (wins for this run), or a recognizable TMS URL/handle; conflicting evidence → ask about the TMS only. The resolved provider (e.g. testrail, the canonical example) is passed to qa-knowledge (scenario_design mode) for the vendor-specific case format (the skill loads its own <vendor>-format binding internally). If no provider resolves but a TMS is clearly in scope, re-read config; if still absent, fall back to the inline <tc_schema> template below (record the fallback per <failure_handling>).
qa-knowledge (scenario_design mode) passing the resolved TMS provider for the test case format.<format_rules> (forbidden fields), <tc_schema> (field-level template), and <title_quality> (naming) sub-blocks below.<format_rules>
Single source of truth for TMS-compatibility constraints — referenced by <tc_schema> Notes, <validation_checklist>, and <pitfalls>; do not restate elsewhere.
Test cases MUST use the Steps + Expected Result shape so they map cleanly to the TMS's separated steps/expected fields used by Phase 6 export (TestRail's custom_steps_separated / custom_expected are the canonical example).
NOT permitted (each breaks Phase 6 export — re-grep test-scenarios.md per <validation_checklist>):
Given , When , Then step shapesPost-conditions field — encode teardown into the test framework or note residual side effects in Expected ResultAutomation field — automation status is TMS metadata or framework concern, not part of the case bodyThe qa-knowledge scenario_design FORMAT binding enforces these on the normal path; the rules are restated here once so they survive when the skill cannot load.
</format_rules>
<tc_schema>
Every test case (TC-NNN) MUST have these fields, in this order. If the qa-knowledge scenario_design mode (or its resolved FORMAT binding) is unavailable or returns an incompatible shape, use this template so Phase 5 output is self-contained:
### TC-NNN: [Concise test case title]
**Priority:** P0 | P1 | P2 | P3
**Type:** Happy Path | Edge Case | Negative | Integration | Performance | Security
**Source Requirement(s):** US-N, FR-N, NFR-N (one or more)
**Preconditions:**
- [Precondition 1]
- [Precondition 2]
**Test Data:**
| Field | Value | Notes |
|-------|-------|-------|
| [field] | [value] | [optional notes] |
**Steps:**
1. [Action] → [observable system response]
2. [Action] → [observable system response]
3. [Action] → [observable system response]
**Expected Result:**
- [Specific, observable, testable outcome — concrete values, not "works correctly"]
**Tags / Suite:** [optional taxonomy hooks for TMS]
Notes:
TC-NNN is a continuous zero-padded sequence across the whole test-scenarios.md file (TC-001, TC-002, …).<format_rules> (single SSoT).
</tc_schema><title_quality> Titles must be specific enough that a reader can guess scope without opening the case:
| Good (specific) | Bad (vague) |
|---|---|
User Login with Valid Credentials (Happy Path) | Test Login |
User Login Fails on 6th Wrong Password (Lockout) | Check Login |
Search Returns Results for Partial Match | Check Search |
Create Order with Out-of-Stock Item (Negative) | Test Order |
Anti-pattern: multiple TCs with identical steps differing only by role or input value → merge per step 5.5 (role/input becomes a parameter), do not split into separate TCs. </title_quality> </generate_test_cases>
Assign priority to each test case:<merge_redundant step="5.5"> Scan all test cases for redundancy and merge to reduce maintenance.
Pattern 1: Same Steps, Different Roles
Pattern 2: Same Steps, Different Input Values
Pattern 3: Same Steps, Different Error Messages
Pattern 4: Same Steps, Different Entities
Merging rules:
After merging: renumber test cases (TC-001, TC-002...), update coverage matrix Target reduction: ~30-50% fewer test cases
Before (redundant):
TC-001: Admin cannot create Job Post
TC-002: Manager cannot create Job Post
TC-003: Viewer cannot create Job Post
After (merged): single TC-001 with role as parameter (see the qa-knowledge scenario_design FORMAT binding for the parameterized format example)
</merge_redundant>
<build_traceability step="5.6">
## Coverage Matrix
| Requirement | Test Case IDs | Count | Status |
|-------------|---------------|-------|--------|
| US-1 | TC-001, TC-002, TC-003 | 3 | Covered |
| FR-1 | TC-001, TC-002, TC-003, TC-006 | 4 | Covered |
| NFR-1 | TC-020 | 1 | Covered |
</build_traceability>
<create_test_document step="5.7">
Write scope: default outputs stay under plans/testgen-{TICKET-KEY}/ (test-scenarios.md here, the requirements.md traceability update in step 5.8) — no coding activation needed; record coding: skipped — writes scoped to plans/testgen-{TICKET-KEY}/ in testgen-state.md. Any write outside that folder → USE SKILL coding first, per testgen-flow.md <phase_5_6_standards_gate>.
plans/testgen-{TICKET-KEY}/test-scenarios.md with this structure:# Test Cases - [TICKET-KEY]
**Generated**: [DateTime]
**Phase**: 5 - Test Case Generation
**Ticket**: [KEY] - [Summary]
---
## Executive Summary
**Total Test Cases**: [Count]
**Merged/Optimized**: [Original count] → [Final count] (reduced by [%])
**Coverage**: [X] user stories, [Y] FRs, [Z] NFRs covered
**Priority Breakdown**:
- P0 (Critical): [Count]
- P1 (High): [Count]
- P2 (Medium): [Count]
- P3 (Low): [Count]
**Test Types**:
- Happy Path: [Count]
- Edge Cases: [Count]
- Negative Tests: [Count]
- Integration: [Count]
- Performance: [Count]
- Security: [Count]
**Parameterized Test Cases**: [Count]
---
## Priority 0 Test Cases (Critical)
[TC entries per `<tc_schema>` — or the resolved FORMAT-binding case format when the `qa-knowledge` scenario_design mode loaded; `<tc_schema>` is the normative fallback shape]
## Priority 1 Test Cases (High)
[TC entries]
## Priority 2 Test Cases (Medium)
[TC entries]
## Priority 3 Test Cases (Low)
[TC entries]
---
## Coverage Matrix
[Table from step 5.6]
## Appendices
- Merged Test Cases Log (original IDs → merged ID → reason)
- Known Limitations
</create_test_document>
<update_traceability step="5.8">
plans/testgen-{TICKET-KEY}/requirements.md traceability matrix with test case IDs
</update_traceability><update_state step="5.9">
plans/testgen-{TICKET-KEY}/testgen-state.md with Phase 5 complete and metrics (total test cases, merged count, priority breakdown, coverage)test-scenarios.md.", HITL required with exact confirmation token (yes / approved / proceed).
</update_state><validation_checklist>
test-scenarios.md created<format_rules> — re-grep test-scenarios.md for Given /When /Then /**Post-conditions**:/**Automation**:; any hit is a Phase-6-breaking defect.<title_quality> — no vague titles (Test X / Check Y / Verify Z). Spot-check P2/P3 cases where vague titles tend to slip in.
</validation_checklist><failure_handling>
requirements.md unusable (absent / empty / no ## section headings / unreadable / zero US-N-FR-N-NFR-N entries): stop Phase 5 and record the specific reason in testgen-state.md (Phase 5 blocked: requirements.md <missing|empty|unreadable|zero testable requirements> at <path>). Route: missing/empty/unreadable → ask the user to rerun Phase 4 (or inspect the file on an IO/parse error); zero testable requirements → surface as a Critical question (No requirements to generate test cases from — should Phase 4 re-run, or is the ticket genuinely out-of-scope for test coverage?). Do NOT fabricate test cases from raw-data.md / analysis.md / answers.md (upstream inputs, not Phase 5's authoritative source) and do NOT emit a test-scenarios.md with zero TCs and call the phase done.qa-knowledge scenario_design mode / its resolved FORMAT binding errors, returns empty, or returns an incompatible shape; OR no FORMAT vendor resolvable from config): fall back to the inline <tc_schema> template in step 5.3. Record Phase 5 note: scenario_design fallback applied — used inline tc_schema in testgen-state.md. Continue Phase 5.test-scenarios.md unwritable — permission denied, disk full): pause, report the filesystem error with the file path, do NOT mark Phase 5 complete.</testgen_flow_test_case_generation>
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub griddynamics/rosetta --plugin rosetta-light70 commands in this plugin
2 plugins in one repository ship this exact command · first indexed Aug 20, 2026
Other plugins' commands for the same job