BuddingConcept

Behavioral Tests

planted Jul 14, 2026 · last tended Jul 14, 2026

Tests should be sensitive to the behavior a caller can observe: they specify the contract, not the implementation. “The more your tests resemble the way your software is used, the more confidence they can give you” (Dodds); Khorikov’s unit of behavior is the same idea given a noun.

This is one half of a pair the literature keeps distinct and Bache’s 2.0 collapsed: sensitive to behavior (this note) and insensitive to structure (its mirror). A test can honor one and violate the other, so this list keeps them separate.

Part of Test Desiderata.

Measuring: mutation score against line coverage (high coverage with a low mutation score flags assertion-free tests), mock density per test, and the test-churn to production-churn ratio.