Definition

Edge Case

An edge case is an unusual, extreme, or unexpected scenario or input that falls outside the typical usage patterns of an application and may cause it to behave incorrectly or fail entirely.

Understanding Edge Case

Edge cases live at the boundaries of what an application was designed to handle. They include things like extremely long text inputs, special characters, empty submissions, zero or negative numbers, simultaneous actions, and rare sequences of user interactions. While each individual edge case may seem unlikely, the collective probability that some user will hit one of them is very high.

AI-generated code is particularly susceptible to edge case failures. When an AI tool generates code from a prompt, it tends to optimize for the most common scenarios described in the prompt. Edge cases are usually not mentioned and therefore not handled. The AI might generate a perfectly functional form that crashes when someone pastes 10,000 characters into a text field, or a date picker that breaks for dates before 1970.

Experienced QA testers know where edge cases tend to hide and proactively test for them. This is one of the key advantages of professional manual testing over self-testing: a trained tester has a mental library of edge cases to try, drawn from experience with hundreds of applications.

Example usage

The app worked perfectly in our demo, but an edge case with a user having no profile photo caused the entire settings page to crash.

Related terms

Learn more