r/scheme • u/arthurgleckler • 4d ago
Final SRFI 269: Portable Test Definitions
Scheme Request for Implementation 269,
"Portable Test Definitions",
by Andrew Tropin and Ramin Honary,
has gone into final status.
The document and an archive of the discussion are available at https://srfi.schemers.org/srfi-269/.
Here's the abstract:
This SRFI defines a portable API for test definitions that is decoupled from test execution and reporting. It provides four definition forms: the universal
ismacro for assertions,testingfor giving groups of assertions human-readable context,testfor grouping assertions into independently executable units, andsuitefor organizing tests into hierarchies. The exportedmetadataauxiliary syntax attaches user-provided information to tests and suites to adjust the behavior of a test runner, for example to select tests by tags or to enforce timeout values. The API is tiny, yet capable and flexible. By focusing on the definition, and leaving execution semantics to test runners, this SRFI offers a common ground that can reduce fragmentation among testing libraries.Unlike side-effect-driven testing frameworks (e.g. SRFI 64), this API produces first-class runtime entities, making it easy to filter, schedule, wrap them in exception guards and continuation barriers, run in arbitrary order, and re-run dynamically generated test subsets. In addition to the usual CLI test runners, it enables runtime-friendly test runners that integrate well with highly interactive development workflows inside REPLs and IDEs, significantly increasing control over test execution, and shortening the feedback loop.
To bridge the test definitions and test runners, the SRFI specifies a message-passing programming interface and test loading and execution semantics recommendations for test runner implementers.
Here is the commit summary since the most recent draft:
- Add SPDX copyright metadata to "TODO.md".
- copy edits
- Finalize.
Here are the diffs since the most recent draft:
https://github.com/scheme-requests-for-implementation/srfi-269/compare/draft-5..final
Many thanks to Andrew and Ramin and to everyone who contributed to the discussion of this SRFI.
Regards,
SRFI Editor