Essay proposes a new vocabulary for software testing built on scopes and oracles

A blog post argues that the everyday vocabulary of software testing has long been vague. The author says the 'unit' in unit test is not really defined, and integration tests integrate arbitrarily scoped modules. An E2E test makes sense as a concept, but it underspecifies what is actually tested and how: automated agents, human supervision, a predefined set of actions or random exploration all get swept under the rug. Stress, load and penetration tests have, in the author's words, no proper classification in the wild and seem to rest on 'vibes'. A quick web search turns up a 'level' based classification and an 'ad' from Atlassian listing 7 'types' of software tests.

The author wants something better: a vocabulary that is actionable, so you can upgrade or downgrade your tests depending on the resources you have, with a recipe of available options for your situation. The author warns the piece is biased towards random testing, which the author has been working on for a while. The proposal is roughly 5 categories, some orthogonal to each other and some that branch internally. The text available covers three of them: scopes, purposes and hypotheses, and oracles.

Scopes. The scope of a test has two axes. One follows language constructs: a function, a class/struct/type, a module or a system. The other is whether the scope is stateful or stateless. Most functions are expected to be stateless and most systems stateful, though both exceptions exist. The author notes the scopes blur (the entry function of a large system could be called the system), but says they are useful because inputs differ by scope. Functions, especially stateless ones, take arbitrary structures of the programming language, and their signatures are often far looser than what the function will ever receive. Systems receive interactions or directives, usually serialized data that is parsed and validated, which acts as a natural discriminator that shrinks the input space.

State can be handled by making a stateful test isomorphic to a stateless one: the initial state, or the state pair (s, s'), becomes part of the input and output. That works when the state is simple enough to construct. For complex, realistic workloads it is often impossible, and then the author suggests treating the system as a simulation. You send messages based on the public API, read the answers or confirmations in multi-message scenarios, and check intermediate, initial and final states against invariants, preconditions and postconditions. To make function testing more tractable, the author also recommends Design by Contract (DbC), natively supported in C++26, D, Kotlin and Racket, with library support in Python and Rust. DbC lets you write down assumptions about inputs as annotations checked at runtime and sometimes at compile time through static analysis. The author's example: a hashmap read from the system along with a list of keys created with it. The language treats every lookup as fallible, though all of them should succeed. DbC, more expressive type systems and better domain modeling ease that tension.

Purposes and hypotheses. Every test evaluates or measures something and states a hypothesis that running the test tries to falsify. The simplest is functional correctness. Others include execution time (performance), security, and resilience to network delays, drops and faults, or to file system faults and disk corruption. Chaos testing mostly means testing robustness against unexpected faults. Hypotheses differ by domain. For a timing side channel, the hypothesis is that an attacker can extract information from the execution time of two different inputs. For accessibility, it is that a user with a disability will be unable to perform an action they need. Each needs a domain-specific oracle.

Oracles. The natural oracle is a human. The author calls testing where the oracle is a human user's judgement 'tinker testing' and says a traditional test is ultimately a codification of tinker tests: you build a feature, then a small test with easily changed parameters, and play with the output to check intended behavior and find unintended consequences. The second oracle type is examples, such as add(3, 5) == 8. Examples can express hypotheses beyond correctness, such as time bounds or checks that an SQL sanitizer catches specific injections. Expect, golden and snapshot testing take this far by saving the current output as the accepted behavior. The author says their main use seems to be catching regressions, but they also produce examples cheaply, and recommends a Jane Street blog post on expect testing.

The third oracle type is inline assertions, which tie back to DbC. A precondition is an assertion at the start of a block, a postcondition at the end, and an invariant should hold at both ends though it may break in the middle. An inline assertion can go anywhere. The author notes that some high-assurance companies advocate aggressive use of inline assertions even in production, and advises everyone to read the Tiger Style documentation. Unlike tinker testing (human judgement as both method and oracle) and example-based testing (input and expected output supplied together), inline assertions are not tied to a way of producing inputs. They specify behavior and can be used alongside other methods. The fourth oracle type is properties, which leads to property-based testing. The available text ends there, in the middle of that section.

Key facts

  • The author says terms like unit, integration, E2E, stress and load test are vague, and that the 'unit' in unit test is not really defined.
  • The proposal is roughly 5 categories of testing, some orthogonal and some branching; the text available covers scopes, purposes and hypotheses, and oracles.
  • Scope has two axes: function, class/struct/type, module or system, and stateful versus stateless. Design by Contract is suggested to narrow function inputs.
  • Four oracle types are named: human 'tinker testing', examples (including expect and snapshot testing), inline assertions, and properties, which lead to property-based testing.
  • The author wants an actionable vocabulary so tests can be upgraded or downgraded with available resources, and says the piece leans towards random testing.

Why it matters

Teams use words like unit test, integration test and load test as if they were precise, but the author argues they hide what is actually being tested and how. The post tries to replace them with categories you can act on: what scope you test, what hypothesis you try to falsify, and what oracle judges the result. The stated goal is a vocabulary that tells you which options you have for your situation and lets you scale tests up or down with the resources you have.

Who it affects

Mainly working programmers, QA engineers and anyone who designs test suites. The author also touches on QAs directly, noting that they hand-craft scenarios to find unusual or unwanted behavior and also program oracles through automated scenarios. People interested in random and property-based testing are the author's stated focus.

How to use it

The post offers concrete moves rather than a tool. Describe a test by its scope (construct level and statefulness), its hypothesis (correctness, timing, security, fault resilience, accessibility) and its oracle (human, example, inline assertion, property). Turn a stateful test into a stateless one by treating state as input and output, or treat a complex system as a simulation driven through its public API. Use Design by Contract where your language supports it, and consider expect testing and inline assertions. The author points readers to a Jane Street blog post on expect testing and to the Tiger Style documentation.

How solid is it

This is one person's opinion piece. The post cites no empirical data, benchmarks or studies behind the claims, so the argument stands on reasoning and examples. The author openly says the framing is biased towards random testing. The text available ends in the middle of the property-based testing section, so the remaining categories of the proposed five and any final recommendations are not covered here.

Risks and caveats

The categories are described as rough: some are orthogonal and some branch, and the author admits the scopes blur, for example an entry function versus the system itself. The language list for Design by Contract is the author's own and the author says there may be others they have not heard of. The post is a proposal for vocabulary, not a standard, so adopting it means convincing a team to use new terms alongside the familiar ones.

“We should have a vocabulary that is actionable, you should be able to upgrade or downgrade your tests based on the availability of resources”

— the post's author