Leaky abstraction

Leaky abstraction image
A leaky abstraction is a simplified model or interface that can't fully hide the complexity beneath it, so details from underneath show through in ways users of the abstraction have to deal with.

Why it matters: Every model is a simplification, so every model leaks somewhere. For testers, it's a reminder not to trust a risk model, diagram, framework or API too far, and to look for where its gaps might cause problems.

In practice: Testers ask where an abstraction might break down, such as under load, with unusual data or when something underneath changes. They test at the boundaries where hidden details are most likely to show through.

Examples:

  • A database library that hides SQL until a slow query forces developers to understand it.
  • A risk model that treats all users as the same until one group behaves very differently.

Common pitfalls:

  • Spending effort perfecting an abstraction that will always leak somewhere.
  • Testing only through the abstraction, and missing problems in what it hides.

Who coined the term leaky abstraction? The phrase was popularised by software writer Joel Spolsky, who described a law of leaky abstractions: all non-trivial abstractions, to some degree, are leaky.
Explore MoT
Test Forward 2027 ยท Software Quality in the age of AI image
Tue, 19 Jan 2027
Test Forward is one afternoon at Station F with the QA and engineering people closing that gap in their own teams.
MoT Software Testing Essentials Certificate image
Boost your career in software testing with the MoT Software Testing Essentials Certificate. Learn essential skills, from basic testing techniques to advanced risk analysis, crafted by industry experts.
Into The Motaverse image
Into the MoTaverse is a podcast by Ministry of Testing, hosted by Rosie Sherry, exploring the people, insights, and systems shaping quality in modern software teams.
Subscribe to our newsletter