Alperen Keles argues that familiar labels such as unit, integration, and end-to-end testing are too vague to guide test design: they leave the tested scope, behavior, and method unclear, while categories such as load and stress testing lack a consistent classification. A better vocabulary should describe tests in ways that help teams choose or adapt methods to available resources. The proposed framework begins with the test unit’s scope: a function, type, module, or system, considered as stateful or stateless. Scope matters because functions often accept a broad range of language-level inputs, whereas systems receive more constrained interactions through public interfaces. Stateful systems can sometimes be modeled as stateless input-output transformations, but complex, realistic state is often better tested through simulations of sequences of messages and interactions. Design by Contract and richer types can also narrow function inputs to valid assumptions.
A second dimension is the test’s purpose: the hypothesis it seeks to disprove, such as functional correctness, performance, security, accessibility, or resilience to network and hardware faults. Each hypothesis needs an appropriate oracle. Keles distinguishes human judgment during exploratory “tinker testing,” concrete expected results in example-based tests (including snapshots or golden tests), and inline assertions that enforce preconditions, postconditions, and invariants. These approaches can complement one another: tinkering helps reveal unintended behavior, examples make expectations repeatable, and assertions check conditions within program execution. The framework treats testing as a deliberate combination of scope, purpose, method, and oracle, rather than relying on broad labels that conceal what a test actually verifies.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.