How to Document Edge Cases in Requirements
TL;DR
- Systematically probe boundaries, empty states, and unusual-but-plausible situations, rather than relying on them occurring to you by chance.
- Document each edge case with the same Given-When-Then specificity as the main requirement.
- Prioritize edge cases by realistic likelihood and impact — not every theoretical edge case needs equal attention.
An edge case is a situation at the boundary of normal, expected use — an empty input, a maximum value, a rare but real combination of conditions — that a requirement needs to explicitly account for. Undocumented edge cases are one of the most common sources of bugs discovered only after development, since they're easy to overlook when focused on the primary, expected use case.
Quick facts
- Edge cases are most reliably found through systematic prompts (boundaries, empty states, unusual combinations), not by hoping to notice them naturally.
- Documenting an edge case with the same specificity as the main requirement (using Given-When-Then) makes it just as testable and unambiguous.
- This connects to How to Write Clear Acceptance Criteria, where edge cases are one of the three categories every set of criteria should cover.
How to identify and document edge cases, step by step
- Start from the main, expected use case, fully documented first. Understanding the primary path clearly is the foundation for identifying where boundaries and exceptions to it might occur.
- Systematically probe common edge case categories. Ask: what happens with empty or missing input? What happens at the minimum or maximum allowed value? What happens with unusually large or unusually small quantities? What happens if a dependent system is unavailable?
- Consider unusual but genuinely plausible combinations of conditions. Not every theoretical combination needs to be documented, but ones that could realistically occur — a user with an unusual but real account configuration, for example — deserve consideration.
- Ask people with direct, hands-on experience of the current process or similar systems what unusual situations they've actually encountered — real-world experience often surfaces edge cases a purely theoretical review would miss.
- Document each identified edge case with the same specificity as the main requirement, using Given-When-Then or a similarly structured format, so it's just as testable and unambiguous.
- Prioritize edge cases by realistic likelihood and impact. Not every theoretical edge case deserves equal engineering effort — a genuinely rare, low-impact edge case might be explicitly deprioritized (documented as a known limitation) rather than fully engineered around.
- Review the documented edge cases with the development team, since they often have technical insight into additional edge cases (like specific data type limitations) that aren't obvious from a purely business perspective.
Common categories of edge cases to systematically check
- Empty or missing input: What happens when a required field is left blank, or an expected data source has no data?
- Boundary values: What happens at the exact minimum or maximum allowed value, or just beyond it?
- Unusual quantities: What happens with an unusually large volume (1,000 items in a cart) or an unusually small one (exactly one)?
- Concurrent or conflicting actions: What happens if two users try to perform a conflicting action simultaneously (like both editing the same record)?
- System or dependency failure: What happens if an external service, API, or database the feature depends on is temporarily unavailable?
- Unusual but real account or data states: What happens for a user account in an atypical but genuinely possible state (a suspended account, an account with unusual permissions)?
Why undocumented edge cases are a common source of bugs
When a requirement only describes the expected, primary use case, developers implementing it have to guess at the correct behavior for anything outside that primary path — sometimes guessing correctly, sometimes not. Explicitly documenting edge cases removes this guesswork, giving developers a clear, deliberate specification for handling the situation, rather than leaving it to whatever behavior happens to emerge from the implementation without explicit design.
A worked example
A requirement for a file upload feature initially only specifies: "Users can upload a profile photo." Systematically probing edge cases reveals several worth documenting: what happens if the selected file exceeds the maximum size (an error message, not a silent failure); what happens if a user uploads a non-image file (rejected with a clear message about accepted formats); what happens if the upload is interrupted partway through (allow retry without requiring the user to start over from the profile settings page); and what happens if a user rapidly uploads multiple times in quick succession (the system should handle this gracefully, not create duplicate uploads or a confusing state). Each of these, documented explicitly with Given-When-Then, gives the development team a clear, deliberate specification rather than leaving these real, plausible scenarios to chance.
Common mistakes when documenting edge cases
- Only documenting the primary, expected use case, leaving edge case behavior to be decided informally (or inconsistently) during development.
- Treating every theoretical edge case as equally important, spending disproportionate effort on extremely unlikely scenarios while genuinely likely ones go undocumented.
- Not consulting people with real, hands-on experience of the current process, missing edge cases that theoretical review alone wouldn't surface.
- Documenting edge cases vaguely, rather than with the same specific, testable structure used for the main requirement.
FAQ
How many edge cases should be documented for a typical requirement? This varies by the requirement's complexity and risk, but systematically checking common categories (empty input, boundaries, failures, unusual combinations) for every requirement is a reliable baseline practice.
Should every documented edge case be fully engineered around? Not necessarily — some genuinely rare, low-impact edge cases might be explicitly deprioritized as a documented known limitation, as long as this is a deliberate decision, not an oversight.
Who's responsible for identifying edge cases — the BA/PM or the developer? Ideally both — a BA or PM brings business context and real-world scenario knowledge, while developers often identify additional technical edge cases (like specific data type or system limitations) neither party would think of alone.
How do you know if you've identified enough edge cases? There's no fixed number, but systematically working through the common categories (empty states, boundaries, failures, unusual combinations) for a given requirement is a reasonable, repeatable process for reaching solid, if not exhaustive, coverage.