test-case-design
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.
What this skill does
# Test Case Design **Write comprehensive, maintainable test cases that catch bugs early.** ## When to Use - Writing test cases for new features - Improving test coverage - Creating regression test suites - Documenting test scenarios - Training new QA team members ## Test Case Structure ### Standard Format ```markdown ## 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.] ``` ### Example Test Case ```markdown ## 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 ``` ## BDD/Gherkin Format ### Feature File ```gherkin # 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" ``` ## Test Design Techniques ### Equivalence Partitioning ```markdown ## 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 | ``` ### Boundary Value Analysis ```markdown ## 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 | ``` ### Decision Table ```markdown ## 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 | ``` ### State Transition ```markdown ## 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) ``` ## Test Coverage Checklist ```markdown ## 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 Organization ```markdown ## 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 ``` ## Best Practices 1. **One assertion focus** - Test one thing per test case 2. **Independent tests** - No dependencies between tests 3. **Clear naming** - Name describes expected behavior 4. **Maintainable** - Easy to update when requirements change 5. **Traceable** - Link to requirements/user stories 6. **Prioritized** - Know which tests matter most 7. **Reviewed** - Peer review test cases like code
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.