| name | speckit-testcases |
| description | Generate a testcases.csv from a speckit feature spec. Explicit invocation only — never load from context or topic. Use only when the user types the exact command "speckit-testcases". |
| disable-model-invocation | true |
Speckit Testcases Workflow
Generates testcases.csv from the feature spec, covering all user journeys, acceptance criteria, and edge cases.
Workflow position: Suggested after /speckit-specify or /speckit-clarify when spec.md is ready. Can be run at any later phase — not tied to a specific position in the pipeline.
Setup
Run: .specify/scripts/bash/check-prerequisites.sh --json from repo root. Parse FEATURE_DIR.
Load Context
- REQUIRED:
FEATURE_DIR/spec.md — user stories, acceptance criteria, edge cases
- OPTIONAL:
FEATURE_DIR/quickstart.md
- Load
.specify/templates/test-cases.csv for column structure
Coverage Requirements
| Source | Type | Minimum |
|---|
| User journeys/primary flows | Happy path | One per distinct journey |
| Acceptance Criteria | Functional verification | One or more per AC |
| Edge cases/boundary conditions | Negative/boundary | One per edge case |
| Required-field misconfiguration | Negative/boundary | See sweep rules below |
| Published page behaviour | Publication verification | At least one end-to-end |
Required-Field Misconfiguration Sweep
For every field the spec marks as required, generate test cases for each of these failure modes:
- Row absent — the key-value row is missing entirely
- Value empty — the row is present but the value cell is blank
- Value malformed — the row is present but the value is not in the expected format (e.g. non-ISO date, invented timezone)
Additionally, always include a zero-input boundary test: the block header exists but contains no configuration rows at all.
These cases may overlap with edge cases listed in the spec. Deduplicate by title, but never skip a failure mode just because the spec didn't call it out explicitly. The spec's edge-case list is a floor, not a ceiling.
Test Case Writing Rules
- Author perspective: All steps executable by content author in AEM Editor or published site — no dev tools, no code inspection
- Atomic steps: One action per step
- Unambiguous expected results: Every step has clear, observable expected result
- Title pattern:
[Component / Feature Area] | [What is verified]
- Preconditions in step 1: First step sets up starting state
- No implementation details: No Java, Sling Models, HTL, or AEM APIs in steps
CSV Format
ID,Work Item Type,Title,Test Step,Step Action,Step Expected,Area Path,Assigned To,State
"","Test Case","[Title]",,,,"Consumer Platforms\Adobe Experience Manager (AEM)","","Design"
,,,"1","[Action]","[Expected]",,,
,,,"2","[Action]","[Expected]",,,
ID: always empty
Work Item Type: always "Test Case" for header row
Area Path: always "Consumer Platforms\Adobe Experience Manager (AEM)"
State: "Design" for test case header; empty for step rows
Test Case Organization
- Author experience (finding/using component in AEM Editor)
- Functional / AC verification (one per AC)
- Variations and combinations
- Responsive / cross-device (if relevant)
- Publication verification
- Edge cases and negative tests
- Regression guard
Quality Checklist Before Writing
Report
Output: testcases.csv path, total count, coverage breakdown (journeys, ACs, edge cases), unmapped spec sections, and readiness for next phase: /speckit-testcontent (recommended to generate reference content in digitalxn-aem-nc-sites-reference-content).
Errors
- ERROR if
spec.md not found
- ERROR if
spec.md contains [NEEDS CLARIFICATION] markers