Edge Case Analysis
Overview
This skill defines how to systematically identify and test edge cases - unusual conditions, extreme values, or unexpected combinations that can cause failures. Finding edge cases early prevents production bugs and improves robustness.
When to Use
- When designing functions, APIs, or user inputs
- Before delivering any solution that handles variable input
- When reviewing code or specifications for completeness
- When creating test plans
- Don't use when: Solution only handles fixed, known, single value
Core Procedures
Step 1: Identify Dimensions
For each input, parameter, or condition, identify its dimensions:
- Range: Minimum to maximum values
- Type: String, number, list, object, null, undefined
- Length: Empty, single, typical, maximum
- Encoding: Unicode, special characters, binary, emojis
- State: New, existing, deleted, locked, expired
- Access: Owner, admin, guest, anonymous, unauthorized
Step 2: Apply Analysis Techniques
For each dimension:
BOUNDARY VALUES: Test exact boundaries and just outside
- Min-1, Min, Min+1, Typical, Max-1, Max, Max+1
- Zero, one, many, too many
COMBINATIONS: Test pairs of conditions
- Valid input + invalid state
- Normal operation at boundary conditions
- Multiple edge cases occurring simultaneously
NEGATIVE TESTING: Test what should NOT work
- Invalid types for each parameter
- Missing required fields
- Unauthorized access attempts
- Malformed input (truncated, corrupted)
TEMPORAL: Test time-based edge cases
- Midnight, end of month, leap day, DST changes
- Timezone conversions, expired data
- Race conditions, concurrent operations
- Rapid succession of same operation
Step 3: Document and Prioritize
EDGE CASE
=========
Description: [what condition could cause a problem]
Category: [boundary/combination/negative/temporal/state]
Likelihood: [RARE/UNLIKELY/POSSIBLE/LIKELY]
Impact: [LOW/MEDIUM/HIGH/CRITICAL]
Test: [how to validate this edge case]
Status: [OPEN / TESTED PASS / TESTED FAIL / FIXED]
Step 4: Validate Fixes
For each edge case that fails:
- Understand WHY it fails (root cause)
- Fix the root cause, not just the symptom
- Re-test the edge case
- Add to regression test suite
Quality Checklist
Error Handling
- Error: Too many edge cases to test all
Response: Prioritize by Impact × Likelihood, test HIGH and CRITICAL first
- Error: Edge case requires conditions hard to reproduce
Response: Simulate or mock the condition, document in automated test
Cross-Team Integration
Related Skills: testing-strategy, test-driven-development, testing-verification, output-validation-checklist
Used By: Testers, developers, QA agents, validators, especially Performance, Load, Security testing agents
1---2name: edge-case-analysis3description: Use when designing solutions to identify and test boundary conditions, unusual inputs, and uncommon scenarios that could cause failures. This skill provides a systematic approach to finding edge cases before they become bugs in production.4---56# Edge Case Analysis78## Overview9This skill defines how to systematically identify and test edge cases - unusual conditions, extreme values, or unexpected combinations that can cause failures. Finding edge cases early prevents production bugs and improves robustness.1011## When to Use12- When designing functions, APIs, or user inputs13- Before delivering any solution that handles variable input14- When reviewing code or specifications for completeness15- When creating test plans16- **Don't use when:** Solution only handles fixed, known, single value1718## Core Procedures1920### Step 1: Identify Dimensions21For each input, parameter, or condition, identify its dimensions:22- **Range:** Minimum to maximum values23- **Type:** String, number, list, object, null, undefined24- **Length:** Empty, single, typical, maximum25- **Encoding:** Unicode, special characters, binary, emojis26- **State:** New, existing, deleted, locked, expired27- **Access:** Owner, admin, guest, anonymous, unauthorized2829### Step 2: Apply Analysis Techniques30For each dimension:3132**BOUNDARY VALUES:** Test exact boundaries and just outside33- Min-1, Min, Min+1, Typical, Max-1, Max, Max+134- Zero, one, many, too many3536**COMBINATIONS:** Test pairs of conditions37- Valid input + invalid state38- Normal operation at boundary conditions39- Multiple edge cases occurring simultaneously4041**NEGATIVE TESTING:** Test what should NOT work42- Invalid types for each parameter43- Missing required fields44- Unauthorized access attempts45- Malformed input (truncated, corrupted)4647**TEMPORAL:** Test time-based edge cases48- Midnight, end of month, leap day, DST changes49- Timezone conversions, expired data50- Race conditions, concurrent operations51- Rapid succession of same operation5253### Step 3: Document and Prioritize54```55EDGE CASE56=========57Description: [what condition could cause a problem]58Category: [boundary/combination/negative/temporal/state]59Likelihood: [RARE/UNLIKELY/POSSIBLE/LIKELY]60Impact: [LOW/MEDIUM/HIGH/CRITICAL]61Test: [how to validate this edge case]62Status: [OPEN / TESTED PASS / TESTED FAIL / FIXED]63```6465### Step 4: Validate Fixes66For each edge case that fails:67- Understand WHY it fails (root cause)68- Fix the root cause, not just the symptom69- Re-test the edge case70- Add to regression test suite7172## Quality Checklist73- [ ] All input dimensions analyzed74- [ ] Boundary values identified for each dimension75- [ ] Negative testing scenarios defined76- [ ] Temporal edge cases considered (if applicable)77- [ ] High-impact edge cases added to test suite78- [ ] Root cause identified for any failing edge cases7980## Error Handling81- **Error:** Too many edge cases to test all82 **Response:** Prioritize by Impact × Likelihood, test HIGH and CRITICAL first83- **Error:** Edge case requires conditions hard to reproduce84 **Response:** Simulate or mock the condition, document in automated test8586## Cross-Team Integration87**Related Skills:** testing-strategy, test-driven-development, testing-verification, output-validation-checklist88**Used By:** Testers, developers, QA agents, validators, especially Performance, Load, Security testing agents