Generate comprehensive test cases from acceptance criteria and requirements to ensure thorough quality validation.
/plugin marketplace add marcel-Ngan/ai-dev-team/plugin install marcel-ngan-ai-dev-team@marcel-Ngan/ai-dev-teamThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Generate comprehensive test cases from acceptance criteria and requirements to ensure thorough quality validation.
## TC-{{id}}: {{testCaseName}}
**Story:** {{storyKey}}
**Priority:** Critical | High | Medium | Low
**Type:** Functional | Integration | E2E | Performance | Security
### Preconditions
- {{precondition1}}
- {{precondition2}}
### Test Data
| Variable | Value | Notes |
|----------|-------|-------|
| {{var}} | {{value}} | {{notes}} |
### Steps
| Step | Action | Expected Result |
|------|--------|-----------------|
| 1 | {{action}} | {{expected}} |
| 2 | {{action}} | {{expected}} |
| 3 | {{action}} | {{expected}} |
### Postconditions
- {{postcondition}}
### Notes
{{additionalNotes}}
For each acceptance criterion, generate:
| AC Element | Test Types Needed |
|---|---|
| Happy path | Positive test |
| Validation rule | Boundary tests, invalid input tests |
| Error condition | Negative tests |
| Edge case | Edge case tests |
| Performance requirement | Performance test |
| Security requirement | Security test |
Per Feature:
├── Positive Tests (Happy Path) ~30%
├── Negative Tests (Error Cases) ~30%
├── Boundary Tests (Limits) ~20%
├── Edge Case Tests ~15%
└── Security/Performance ~5%
## TC-{{id}}: {{feature}} - Successful {{action}}
**Priority:** High
**Type:** Functional
### Preconditions
- User is logged in
- Required data exists
### Steps
| Step | Action | Expected Result |
|------|--------|-----------------|
| 1 | Navigate to {{page}} | Page loads successfully |
| 2 | Enter {{validInput}} in {{field}} | Input accepted |
| 3 | Click {{button}} | {{successResult}} |
### Expected Outcome
- {{successState}}
- {{dataChange}}
## TC-{{id}}: {{feature}} - {{errorCondition}}
**Priority:** High
**Type:** Functional
### Preconditions
- User is logged in
### Test Data
| Input | Value | Why Invalid |
|-------|-------|-------------|
| {{field}} | {{invalidValue}} | {{reason}} |
### Steps
| Step | Action | Expected Result |
|------|--------|-----------------|
| 1 | Enter {{invalidValue}} in {{field}} | Input shown |
| 2 | Click {{button}} | Error displayed |
| 3 | Verify error message | Shows "{{errorMessage}}" |
### Expected Outcome
- Form does not submit
- Data is not changed
- User can correct and retry
## TC-{{id}}: {{field}} - {{boundaryType}} Boundary
**Priority:** Medium
**Type:** Boundary
### Boundary Definition
- **Field:** {{field}}
- **Min:** {{min}}
- **Max:** {{max}}
### Test Data
| Scenario | Value | Expected |
|----------|-------|----------|
| Below min | {{min-1}} | Rejected |
| At min | {{min}} | Accepted |
| At max | {{max}} | Accepted |
| Above max | {{max+1}} | Rejected |
### Steps
| Step | Action | Expected Result |
|------|--------|-----------------|
| 1 | Enter {{boundaryValue}} | {{expected}} |
| 2 | Submit form | {{result}} |
## TC-{{id}}: {{feature}} - {{securityScenario}}
**Priority:** Critical
**Type:** Security
### Attack Vector
{{attackDescription}}
### Steps
| Step | Action | Expected Result |
|------|--------|-----------------|
| 1 | Attempt {{attack}} | Attack is blocked |
| 2 | Verify no data exposure | No sensitive data shown |
| 3 | Check logs | Attack attempt logged |
### Payloads to Test
{{payload1}} {{payload2}}
### Expected Outcome
- Attack is prevented
- No data leakage
- Appropriate error message (no details)
## Test Suite: {{formName}} Form
### Field Validation Tests
#### {{fieldName}}
| TC ID | Scenario | Input | Expected |
|-------|----------|-------|----------|
| TC-001 | Valid {{field}} | {{validValue}} | Accepted |
| TC-002 | Empty {{field}} | (blank) | "Required" error |
| TC-003 | {{field}} too short | {{shortValue}} | "Min length" error |
| TC-004 | {{field}} too long | {{longValue}} | "Max length" error |
| TC-005 | {{field}} invalid format | {{badFormat}} | "Invalid format" error |
| TC-006 | {{field}} special chars | {{specialChars}} | {{expected}} |
### Form Submission Tests
| TC ID | Scenario | Expected |
|-------|----------|----------|
| TC-010 | All valid inputs | Success message, data saved |
| TC-011 | Network error | Error message, retry option |
| TC-012 | Server error (500) | Friendly error, no data loss |
| TC-013 | Duplicate submission | Prevented or handled |
## Test Suite: {{entity}} CRUD
### Create Tests
| TC ID | Scenario | Expected |
|-------|----------|----------|
| TC-C01 | Create with all fields | Success |
| TC-C02 | Create with required only | Success |
| TC-C03 | Create missing required | Error |
| TC-C04 | Create duplicate | Error or handled |
### Read Tests
| TC ID | Scenario | Expected |
|-------|----------|----------|
| TC-R01 | View existing | Data displayed |
| TC-R02 | View non-existent | 404 or empty state |
| TC-R03 | View unauthorized | 403 |
| TC-R04 | List pagination | Correct page data |
### Update Tests
| TC ID | Scenario | Expected |
|-------|----------|----------|
| TC-U01 | Update valid changes | Success |
| TC-U02 | Update with invalid data | Validation error |
| TC-U03 | Update non-existent | 404 |
| TC-U04 | Concurrent update | Conflict handled |
### Delete Tests
| TC ID | Scenario | Expected |
|-------|----------|----------|
| TC-D01 | Delete existing | Success |
| TC-D02 | Delete non-existent | 404 |
| TC-D03 | Delete with dependencies | Error or cascade |
| TC-D04 | Delete unauthorized | 403 |
## Test Suite: {{endpoint}} API
### Request Validation
| TC ID | Scenario | Input | Expected Status |
|-------|----------|-------|-----------------|
| TC-A01 | Valid request | {{validBody}} | 200/201 |
| TC-A02 | Missing required field | {{missingField}} | 400 |
| TC-A03 | Invalid data type | {{wrongType}} | 400 |
| TC-A04 | Malformed JSON | {{badJson}} | 400 |
### Authentication
| TC ID | Scenario | Auth | Expected |
|-------|----------|------|----------|
| TC-A10 | No auth header | None | 401 |
| TC-A11 | Invalid token | Bad token | 401 |
| TC-A12 | Expired token | Expired | 401 |
| TC-A13 | Valid token | Good token | 200 |
### Authorization
| TC ID | Scenario | Role | Expected |
|-------|----------|------|----------|
| TC-A20 | Admin access | Admin | 200 |
| TC-A21 | User access | User | 200 or 403 |
| TC-A22 | Guest access | None | 401 |
| Data Type | Valid Examples | Invalid Examples |
|---|---|---|
test@example.com | test, @.com, test@ | |
| Phone | +1234567890 | abc, 123 |
| Password | SecureP@ss1 | 123, password |
| Date | 2025-01-15 | 01-15-2025, invalid |
| URL | https://example.com | not-a-url, ftp:// |
| Number | 42, 0, -5 | abc, 12.34.56 |
| Constraint | Values to Test |
|---|---|
| Min: 0 | -1, 0, 1 |
| Max: 100 | 99, 100, 101 |
| Length: 1-50 | "", "a", "a"×50, "a"×51 |
| Required | null, undefined, "", valid |
## Test Execution: {{storyKey}}
**Tester:** QA Engineer Agent
**Date:** {{date}}
**Environment:** {{environment}}
### Results Summary
| Status | Count |
|--------|-------|
| Passed | {{passed}} |
| Failed | {{failed}} |
| Blocked | {{blocked}} |
| Skipped | {{skipped}} |
### Test Results
| TC ID | Title | Status | Notes |
|-------|-------|--------|-------|
| TC-001 | {{title}} | Pass/Fail | {{notes}} |
### Defects Found
| TC ID | Defect | Severity | Jira |
|-------|--------|----------|------|
| TC-005 | {{defect}} | {{severity}} | {{bugKey}} |
| Agent | Test Case Generation Use |
|---|---|
| QA Engineer | Primary - generates all test cases |
| Business Analyst | May draft AC-based cases |
| Senior Developer | May generate unit test cases |
| DevOps Engineer | May generate deployment verification tests |
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.