A passing run that mostly tested empty lists
A passing QuickCheck run in the year 2000 printed OK: passed 100 tests. In one of the paper's own examples, 43 percent of the generated inputs were trivial — empty lists — and only nineteen cases reached a length greater than one. The suite was green. The claim underneath it was much thinner than the green tick suggested.
That example sits in Claessen and Hughes's ICFP 2000 paper, QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs (Chalmers University of Technology, pp. 268–279, DOI 10.1145/351240.351266). It remains the sharpest illustration of what property-based testing changes, and of what it quietly depends on.
The unit of assertion changes
An example-based test fixes an input and an expected output. A property states a rule that should hold for every input a generator can produce: reversing a list twice returns the original, serializing then parsing a value preserves it, a parsed configuration never carries a negative timeout. Written as a Haskell function and checked on random inputs, a property is a decidable assertion about an invariant or a relation rather than a catalogue of cases.
The paper's own framing is narrow and worth keeping: random testing suits functional programs because properties can be stated at a fine grain. The original case studies are pure functions and data structures. Handing the machine the input selection does not turn a checkout journey, a permission prompt, or a rendering path into an algebraic law; those semantics resist a single compact predicate.
Distribution is the part that gets dropped in retelling. The paper lets a programmer define custom generators, and it warns that talk about random testing without talking about the distribution of test data is meaningless. In the ordered-list example, the condition ordered xs favoured short lists: lists of length zero or one are always ordered, and only half of length-two lists are. The fix the authors suggest is to replace conditional properties with a generator that produces the intended shape directly.
Four numbers with a label attached
| Artifact | Example output | Reading note |
|---|---|---|
| QuickCheck paper, 2000 | OK: passed 100 tests | 100 was a configurable default in that implementation, not a current tool default |
| QuickCheck paper, 2000 | up to 1,000 candidates for conditional properties | also a 2000 default; exhaustion reported as Arguments exhausted after 64 tests |
| QuickCheck paper, 2000 | 43 percent trivial, 19 cases longer than one | example output from a discussion of bias, not a benchmark |
| Hypothesis | -10.0, nan reduced to 0.0, nan | shrinking example chosen for readability |
| ScalaCheck guide | List(-1, -1) with 2 shrinks | example minimisation output, not a metric |
None of these figures travels well without its label. The 100-run and 1,000-candidate limits describe a specific 2000 implementation; present-day libraries set their own budgets. The 43 percent and the 2 shrinks line are illustrations of a mechanism, not measurements of a tool or a project. Copying them into a comparison table turns an honest example into a fabricated benchmark.
Shrinking arrived after the original paper
The 2000 paper has no shrinking. Searching its twelve pages for the term turns up nothing. The ability to reduce a failing input to a human-readable minimum came with later implementations, and the clearest descriptions are in the Hypothesis and ScalaCheck documentation.
Hypothesis frames the run as a sequence: an explicit @example first, then replay from a failure database, then fresh generation, then shrinking, then a replay of the simplest failing case. The documented reduction turns -10.0, nan into 0.0, nan. That is why the tool is described as both a test runner and a debugging aid — the reported input is meant to be small enough to reason about.
ScalaCheck builds properties with Prop.forAll and generates values through Gen and Arbitrary; the guide's frequency weights put the letter E at roughly 4/14 and Y at roughly 1/14. Its minimisation example collapses an eleven-element list into List(-1, -1) and reports 2 shrinks. Those are weights and sample outputs, not performance data.
Repeatability has a boundary
A fixed seed makes Hypothesis produce the same cases only when nothing else moves: no clocks, no hash randomisation, no external state. derandomize=True seeds from a hash of the test function and is the default under CI; @reproduce_failure replays one exact case but is documented as a temporary measure with no cross-version guarantee. ScalaCheck added deterministic testing in version 1.14.0 in 2018, which fixes case selection and makes runs replayable, not random-free. A seed removes the tool's own randomness; nondeterminism introduced by the program survives the seed unchanged.
The failure database deserves the same caution. Stored under .hypothesis/examples and safe to check into version control, it is a cache that helps a known failure reappear. The documentation says plainly not to rely on it for correctness: when a particular input must be attempted, write it as an @example. A cache that can be discarded is not a guarantee that anything was exercised.
The deeper limit is scope. A generator explores an input space; it does not decide which input spaces matter. Property tests do not replace business-scenario tests or end-to-end runs — the original paper's laws say nothing about whether a user can complete an order, and a biased generator can return a green suite that never touched the interesting region. The right posture is to treat the rule as a complement to a scenario, with the generator examined as carefully as the assertion.
Where the rule gets to travel
A shared runtime and an open catalog change where a written rule can be reused. A property expressed against a capability — an invariant on a data shape, a relation between two operations — can be carried to each host surface that runs that capability, instead of being rewritten as a separate set of examples per surface. That is a mechanism; no first-hand figure exists here for how many invariants a mini-program suite would need, and none is claimed.
What does travel is the discipline: name the rule, choose the generator that feeds it, inspect the distribution before trusting the green result, and keep the scenario tests that check an actual journey. The 2000 paper's 43 percent empty lists remain a useful warning precisely because the run was passing. A green suite is a statement about the inputs it actually saw.