Testing Is a Strategy, Not a Coverage Number

By Esteban Trillo6 min readupdated Continuous DeliveryBooks

Unit, service, acceptance: each lens sees a different bug.
Unit, service, acceptance: each lens sees a different bug.

Part 3 of a series reading Continuous Delivery, by Jez Humble and David Farley. Part 1: Continuous Delivery Is a State, Not a Pipeline.

Part 2 ended at the acceptance stage — the gate that proves your software still does what the business needs. That gate is only as good as the tests behind it. So this part is about the tests.

And it starts with a question that sounds reasonable and is a trap: how much test coverage do we have?

Coverage is a number. It tells you which lines got executed while the tests ran. It does not tell you whether the tests are fast, whether they’re trustworthy, or whether they’d notice if the product broke. You can hit ninety percent coverage with a suite that takes an hour, flakes twice a day, and still lets a real bug through.

More tests is not a plan. A pile of slow, overlapping tests can leave you less able to ship than a lean suite half its size.

Testing is a strategy, not a coverage number.

The strategy is a portfolio. Different kinds of tests buy different things at different prices, and the job is to hold the right mix — automate the boring, repeatable checks so the machine guards against regression, and free your humans for the judgment only humans have.

The pyramid, not the ice-cream cone

The first decision in the portfolio is shape, and the book has an opinion: a wide base of fast unit tests, a thinner layer of service tests, and a small cap of slow end-to-end tests.1

Most teams build the opposite. Unit tests feel less “real,” end-to-end tests feel like proof, so the suite fills up top-heavy — the ice-cream cone. Then they wonder why the build takes forty minutes and fails for reasons nobody can reproduce.

Drag it and watch the trade.

secondsfeedback time
lowflakiness
highconfidence / minute
ice-cream conehealthy pyramid

A wide base of fast unit tests, a thin cap of slow ones. Most failures get caught in seconds, by tests that rarely lie to you — so a green suite means something and you actually run it.

The shape is not aesthetic. It’s economic. A unit test fails in milliseconds and points at one function. An end-to-end test fails in minutes and points at “something, somewhere, in the whole system — or maybe the network.” Push your coverage up into the slow tiers and every failure costs more to run and more to diagnose, and the flakiness compounds until the suite is background noise.

Tests point in four directions

Shape tells you how tests behave. It doesn’t tell you what they’re for. For that, the book leans on Brian Marick’s testing quadrants — two questions that cut the space into four.2

Is the test business-facing (in the language of a user) or technology-facing (in the language of a developer)? And does it support the team as they build, or critique the product as it stands?

Supports the team →← Critiques the product

Business-facing: acceptance tests, examples, stories — “does it do what we agreed?”

Business-facing: exploratory testing, usability, showcases — “is it actually any good?”

Tech-facing: unit & integration tests — “did we build it right?”

Tech-facing: performance, load, security — “does it hold up under stress?”

The point of the grid isn’t to memorize it. It’s to notice that “we have tests” usually means one box — developer unit tests — while three other kinds of confidence go unbought. A coverage number can be high while an entire quadrant is empty. The strategy is deciding, deliberately, how much of each you need.

Acceptance tests speak the domain

The business-facing, team-supporting box is the one that feeds the pipeline’s acceptance stage, and it has a rule worth pulling out.

Write those tests in the language of the domain, not the language of the screen.

A test that says “click the element with id #submit, then assert the div with class .toast contains ‘OK’” is testing your HTML. It breaks the moment someone renames a class, and it never actually said what the software was supposed to do. A test that says “when an overdue invoice is processed, a reminder is sent” describes behavior. You can restyle the whole UI, refactor the internals, and it still holds — because it was never coupled to the mechanics in the first place.

That decoupling is what lets the same acceptance suite survive years of change. It tests the promise, not the plumbing.

A flaky suite is worse than none

Here’s the part that feels like heresy: a test suite you don’t trust is worse than no suite at all.

With no tests, you know you’re flying blind, and you act carefully. With a flaky suite, you think you’re covered, right up until the red you ignored turns out to be real. Worse, flakiness is contagious — one test that fails randomly teaches the whole team to hit “re-run” instead of “investigate,” and now every failure, real or not, gets the same shrug.

That’s why this is a discipline and not a metric. The suite’s value isn’t the number of tests or the percentage of lines. It’s whether, when the bar goes green, you believe it — because that belief is the permission to release.

deep diveIsn't 100% coverage the goal, though?

No, and chasing it usually makes the suite worse. Coverage measures whether a line ran while tests executed — not whether anything was actually asserted, not whether the test would catch a real regression, not whether it’s testing something worth testing. Teams pushing for 100% end up writing brittle tests for trivial getters and setters to move the number, which bloats the suite, slows it down, and adds maintenance for no confidence. Aim coverage at the code where a bug would actually hurt, accept that some lines aren’t worth testing, and spend the saved effort keeping the suite fast and trustworthy. The goal was never the number. It was a suite you’d stake a release on.

So, what is a testing strategy?

It’s not a coverage percentage, and it’s not “write more tests.”

It’s a portfolio you shape on purpose: a fast unit base you can run constantly, a thin cap of slow tests you lean on sparingly, acceptance tests written in the domain so they outlive the code, and a suite kept trustworthy enough that green is a promise you’d bet a release on. It’s also knowing which quadrants you’ve left empty, and choosing that on purpose instead of by accident.

Get that right and the acceptance stage from Part 2 becomes something you trust in seconds, not something you hope about for forty minutes.

Next in the series: Part 4 — configuration and environments, and why “works on my machine” is a bug in the environment, not an excuse.

Footnotes

  1. Martin Fowler, TestPyramid — a wide base of fast, isolated unit tests and a small number of slow, broad end-to-end tests. The inverted shape (the “ice-cream cone”) is the common anti-pattern. ↩

  2. Brian Marick’s testing quadrants — business-facing vs technology-facing, and supporting-the-team vs critiquing-the-product — are used throughout the agile testing literature and in Humble & Farley, Continuous Delivery, as a way to reason about which kinds of tests you actually need. ↩

Piwi hands a single letter to the user at a mailbox; a small note reads no noise.

Get the next one in your inbox

One email when a post goes out, with its sketch. Nothing in between, and one link to leave.

Sign in faster next time?

Add a passkey and skip the email link. Your fingerprint, face or device PIN is enough.