# The Behavior-Test Examples (Chapter 15)

**Use when:** you need to verify what an artifact does without reading its formulas. Feed it known inputs and compare the outputs to hand-computed answers, five to ten checks at a time. You never open a formula.

The working example in the chapter is a rebuilt compliance sheet, and these are the hand-computed checks it passes. Same shape, swap in your artifact, and replace every number with your own.

**Before you scale this up, know where it sits.** Ten matching checks are bounded evidence, not proof: they show the artifact behaves on the tested cases, not that it's right everywhere or forever. For low-stakes artifacts, five to ten checks are a complete verification. For anything financial, compliance, audit, regulatory, or board-facing, this set is the *start*: add full reconciliation of totals and row counts to an independent source, test every named business rule and boundary, keep the versioned test table, and get the domain owner's sign-off on the rules the tests encode (Chapter 15 has the exact scale).

## The synthetic sheet under test

A 12-row hours sheet. Each row: date, person, hours, rate, amount, where amount = hours x rate. Ten ordinary rows at 41.50 each, one weekend row at 2 hours x 41.50 = 83.00, one blank row with no hours. All names invented; amounts rounded.

## The ten hand-computed checks

| # | Check | Hand-computed answer | Artifact output |
| --- | --- | --- | --- |
| 1 | Row count in equals row count out | 12 | [FILL] |
| 2 | Total amount | 10 x 41.50 + 83.00 + 0 = 498.00 | [FILL] |
| 3 | First two weeks subtotal | 10 x 41.50 = 415.00 | [FILL] |
| 4 | Weekend row amount | 2 x 41.50 = 83.00 | [FILL] |
| 5 | Blank row contributes zero, and is not dropped | 0, count stays 12 | [FILL] |
| 6 | First-two-weeks share of total | 415.00 / 498.00 = 83.33% | [FILL] |
| 7 | Average per row | 498.00 / 12 = 41.50 | [FILL] |
| 8 | Person A subtotal (5 ordinary rows) | 5 x 41.50 = 207.50 | [FILL] |
| 9 | Time-and-a-half row | 41.50 x 1.5 = 62.25, rounded to cents | [FILL] |
| 10 | Cross-check: person subtotals sum to total | 207.50 + 290.50 = 498.00 | [FILL] |

## How to build your own set

- Pick five to ten numbers the artifact produces, spread across its behaviors: one total, one subtotal, one percentage, one blank or edge row, one rounding case, one count.
- Compute each by hand, away from the file, and write the answer down first. A check computed after you see the output is a memory, not a check.
- Run the artifact, compare, and log each result. One mismatch stops the ship, no matter how good the other nine look.
- Keep the checks with the artifact: the behavior-test log (templates/kit-07-behavior-test-log.md) holds the running record.
- On the first Monday after every signed review, recompute one number by hand and log it. The file keeps proving itself.

The known-good copy matches on ten hand-computed checks, and the analyst can show the arithmetic. That is the difference between "trust me" and "here is the math, check the tenth row." For anything money-, compliance-, or board-facing, keep climbing after the tenth row: reconcile the full totals, test every named rule, and get the owner's sign-off.