plugins/qa-testing/skills/test-writing/test-case-design/SKILL.md
Design comprehensive test cases with proper coverage and clear documentation. Use this skill when writing test cases, creating test suites, or improving test coverage. Activate when: test case, test scenario, test coverage, test design, write tests, BDD, gherkin.
npx skillsauth add latestaiagents/agent-skills test-case-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Write comprehensive, maintainable test cases that catch bugs early.
## Test Case: TC-[ID]
**Title:** [Clear, action-oriented title]
**Priority:** P0 / P1 / P2 / P3
**Type:** Functional / Regression / Smoke / Edge Case
### Preconditions
- [System state required before test]
- [User state/data required]
### Test Data
- [Specific data needed]
### Steps
| Step | Action | Expected Result |
|------|--------|-----------------|
| 1 | [Do this] | [See this] |
| 2 | [Do that] | [Observe that] |
| 3 | [Verify] | [Confirm] |
### Postconditions
- [Expected system state after test]
### Notes
- [Edge cases, known issues, etc.]
## Test Case: TC-LOGIN-001
**Title:** Successful login with valid credentials
**Priority:** P0
**Type:** Smoke
### Preconditions
- User account exists with email: [email protected]
- User is not currently logged in
- Application is accessible
### Test Data
- Email: [email protected]
- Password: ValidPassword123!
### Steps
| Step | Action | Expected Result |
|------|--------|-----------------|
| 1 | Navigate to /login | Login page displays with email and password fields |
| 2 | Enter email "[email protected]" | Email field populated |
| 3 | Enter password "ValidPassword123!" | Password field shows masked input |
| 4 | Click "Sign In" button | Loading indicator appears |
| 5 | Wait for redirect | User redirected to /dashboard |
### Postconditions
- User is logged in
- Session cookie is set
- Welcome message shows username
### Notes
- Also verify with uppercase email variant
- Test "Remember me" checkbox separately
# features/login.feature
Feature: User Login
As a registered user
I want to log into my account
So that I can access my personalized content
Background:
Given I am on the login page
And I have a valid account
@smoke @p0
Scenario: Successful login with valid credentials
When I enter my email "[email protected]"
And I enter my password "ValidPassword123"
And I click the "Sign In" button
Then I should be redirected to the dashboard
And I should see "Welcome back" message
@p1
Scenario: Login fails with incorrect password
When I enter my email "[email protected]"
And I enter my password "WrongPassword"
And I click the "Sign In" button
Then I should see an error message "Invalid credentials"
And I should remain on the login page
@p1
Scenario Outline: Login validation errors
When I enter my email "<email>"
And I enter my password "<password>"
And I click the "Sign In" button
Then I should see an error message "<error>"
Examples:
| email | password | error |
| | pass123 | Email is required |
| invalid-email | pass123 | Invalid email format |
| [email protected] | | Password is required |
| [email protected] | short | Password too short |
@p2
Scenario: Account locked after multiple failed attempts
Given I have failed login 4 times
When I enter my email "[email protected]"
And I enter my password "WrongPassword"
And I click the "Sign In" button
Then I should see "Account locked" message
And I should see "Try again in 15 minutes"
## Feature: Age Verification
### Valid Partitions:
- 18-25 (young adult)
- 26-64 (adult)
- 65+ (senior)
### Invalid Partitions:
- < 0 (negative)
- 0-17 (minor)
- > 150 (unrealistic)
### Test Cases:
| Partition | Input | Expected |
|-----------|-------|----------|
| Valid young | 21 | Accepted |
| Valid adult | 40 | Accepted |
| Valid senior | 70 | Accepted |
| Invalid minor | 15 | Rejected |
| Invalid negative | -5 | Error |
| Boundary min | 18 | Accepted |
| Boundary max | 17 | Rejected |
## Feature: Quantity Input (1-100)
### Boundaries:
| Value | Type | Expected |
|-------|------|----------|
| 0 | Below min | Error |
| 1 | Min boundary | Valid |
| 2 | Above min | Valid |
| 50 | Nominal | Valid |
| 99 | Below max | Valid |
| 100 | Max boundary | Valid |
| 101 | Above max | Error |
## Feature: Shipping Cost Calculator
### Conditions:
- C1: Order > $50
- C2: Member
- C3: Express shipping
### Actions:
- A1: Free shipping
- A2: Standard rate
- A3: Express rate
- A4: Member discount
| Rule | C1 | C2 | C3 | Actions |
|------|----|----|----|----|
| R1 | Y | Y | N | A1 |
| R2 | Y | Y | Y | A3, A4 |
| R3 | Y | N | N | A1 |
| R4 | Y | N | Y | A3 |
| R5 | N | Y | N | A2, A4 |
| R6 | N | Y | Y | A3, A4 |
| R7 | N | N | N | A2 |
| R8 | N | N | Y | A3 |
## Feature: Order Status
### States:
- Created → Pending Payment
- Pending Payment → Paid / Cancelled
- Paid → Processing
- Processing → Shipped / Cancelled
- Shipped → Delivered / Returned
- Delivered → (end)
- Cancelled → (end)
- Returned → Refunded
- Refunded → (end)
### Test Cases:
1. Happy path: Created → Paid → Processing → Shipped → Delivered
2. Cancellation: Created → Pending → Cancelled
3. Return flow: Delivered → Returned → Refunded
4. Invalid: Shipped → Pending (should fail)
## Feature: [Feature Name]
### Functional
- [ ] Happy path scenarios
- [ ] Alternative flows
- [ ] Error handling
- [ ] Validation messages
- [ ] Default values
### Data
- [ ] Valid data combinations
- [ ] Invalid data handling
- [ ] Boundary values
- [ ] Empty/null values
- [ ] Special characters
- [ ] Max length inputs
### UI/UX
- [ ] Layout and styling
- [ ] Responsive design
- [ ] Loading states
- [ ] Error states
- [ ] Empty states
- [ ] Accessibility
### Integration
- [ ] API calls
- [ ] Database changes
- [ ] External services
- [ ] Event triggers
### Security
- [ ] Authentication required
- [ ] Authorization checked
- [ ] Input sanitization
- [ ] Session handling
### Performance
- [ ] Load time acceptable
- [ ] No memory leaks
- [ ] Handles concurrent users
## Test Suite Structure
tests/
├── smoke/ # Critical path tests (~10 min)
│ ├── login.spec.ts
│ ├── checkout.spec.ts
│ └── search.spec.ts
├── regression/ # Full regression (~2 hours)
│ ├── users/
│ ├── orders/
│ └── products/
├── integration/ # API/service tests
│ ├── api/
│ └── webhooks/
└── e2e/ # End-to-end workflows
├── purchase-flow.spec.ts
└── onboarding.spec.ts
development
Test skills for correct activation, content quality, and regression — both automated checks (frontmatter validity, lint) and manual verification (query-suite activation testing). Covers CI integration and how to catch skill regressions before users do. Use this skill when adding skills to a repo, setting up CI for a skill library, or debugging "the skill exists but doesn't work". Activate when: test skills, validate skills, skill CI, skill linting, skill activation test, skill regression.
documentation
Write the YAML frontmatter for a SKILL.md file so it activates reliably — name, description, and activation keywords that the model matches against. Covers length, tone, and the most common frontmatter mistakes. Use this skill when authoring a new skill, fixing a skill that isn't auto-activating, or reviewing skills for publication. Activate when: SKILL.md frontmatter, skill description, skill activation, skill YAML, write a skill, author a skill.
development
Design skills that fire at the right moment — neither over-eager (noise) nor under-eager (silent). Covers activation specificity, trigger phrases, disambiguation between overlapping skills, and debugging activation. Use this skill when multiple skills could fire on the same query, a skill never fires, or a skill fires too often. Activate when: skill won't activate, skill over-activates, overlapping skills, skill triggers, skill selection, skill disambiguation.
development
Structure SKILL.md content so the model reads just enough — concise summary up front, progressively deeper detail, examples on demand. Covers section ordering, length budgets, when to split into multiple skills. Use this skill when writing or refactoring a skill body, one skill has grown too long, or a skill is wordy but not useful. Activate when: SKILL.md structure, skill content, skill too long, split skill, progressive disclosure, skill body.