Expand description
Headless test harness driving an App with synthetic input.
Headless test harness driving an App with synthetic input.
Also home to conformance, the cross-backend harness that
tests a raw Backend facet against its own trait contract.
TestHarness owns the drive-until-settled loop that a test
would otherwise hand-roll around Headless (retroglyph#612): Headless supplies the backend
and Headless::push_event, and the harness supplies
everything between that and the assertion. Feature-gated
(testing), no effect on release builds. Not a UI-testing framework: no assertions, no
matchers, no fixtures, just the loop and the input synthesis that otherwise gets rewritten per
consumer. See “Driving an App with TestHarness”
for the full workflow.
conformance is a different tool for a different job: it drives a backend directly (no
App, no Terminal) through the obligations Output,
Cursor, and Input each promise but
that a lone impl block never states, catching the five backends in this workspace (and any
future one) disagreeing on them (retroglyph#763).
Modules§
- conformance
- Cross-backend conformance tests for
Output,Cursor, andInput(retroglyph#763).
Structs§
- Test
Harness - Drives an
Appagainst aHeadlessbackend: queues synthetic input, steps frames, and reads back the rendered view.
Enums§
- RunError
- Error returned by
TestHarness::settlewhen the queue never drained within the step budget.
Constants§
- DEFAULT_
MAX_ STEPS - Default step budget for
TestHarness::runbefore it treats a non-draining event queue as a stuck app and panics. - STEP_
DELTA - Fixed per-frame delta
TestHarness::stephands toApp::update.