Coverage Critters

The parcels are piling up. Help the depot crew test every sorting route, then catch the bug hiding behind a perfect score.

A fox sorts parcels through a three-belt depot while a raccoon inspects a suspicious delivery.
Fox runs the belts. Raccoon trusts the results a little less. A healthy working relationship.
1. Two belts2. Handle with care3. The mystery

Two belts. One small test suite.

Send different weights until both the light and heavy belt have been used. Can you do it in two parcels?

Pack a test parcel

The promise: Only parcels above 5 kg belong on the heavy belt.

No routes tested yet. Send your first parcel.

The routing sheet

0 / 2 routes

Awaiting your first parcel.

Every send runs the code. The green lines show the instructions it actually used.

Dispatch ledger

Your test suite is the set of parcels you send. Repeat parcels are allowed; new routes are more useful.

  1. No parcels on this shift yet.

What does coverage tell us?

Branch coverage asks whether a test suite has taken both outcomes of each decision. In these small early-return functions, covering every destination covers every decision outcome too.

It tells you where tests went. It cannot tell you whether the answer was right.

A tiny idea from 2004

Jon bookmarked EMMA, a free Java coverage tool. This depot is a playful, simplified cousin: choose test inputs, see what runs, then check the result against a promise.

No Java required. No actual parcels harmed.