liveBook · Manning

Edge case

As explained in Shipping Go: Develop, deliver, discuss, design, and go again

An edge case is a rare or extreme input or operating condition that can expose unexpected software behavior.

A translation service can pass its normal checks and still fail when a language is unsupported, input contains unusual characters, or values are unexpectedly large or small. An edge case is a rare or extreme condition that exposes behavior you did not expect. section 3.3

Treat edge cases as test scenarios rather than distant speculation. Add a failing test, implement the smallest behavior that satisfies it, and keep the cycle moving without leaping into over-design. section 3.3

Unsupported translations and messy input

A translator returns an empty string for an unknown language or word. Table tests then add cases such as Dutch, “bye,” uppercase values, and trailing spaces; input sanitization normalizes case and whitespace before translation.

How Shipping Go: Develop, deliver, discuss, design, and go again covers it

How deep it goes
Defines rare conditions and demonstrates tests, implementation, refactoring, and sanitization without exhaustive anticipation.
Examples
Uses unsupported languages, unknown words, capitalization, whitespace, strange characters, and extreme numeric values as test scenarios.
What you can do after
Diagnose/debug with it by adding failing scenarios and implementing focused behavior for rare or extreme inputs.
How it connects
Connects edge cases to negative testing, table tests, input sanitization, and test-driven development.

Also explained in

Compare how 7 books explain edge case →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Shipping Go: Develop, deliver, discuss, design, and go again. The section links point to the parts of the book it draws on.