ReviewOS

zig-utils/zig-test-framework

Define a stable JSON event protocol for reporters and integrations

#10
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Motivation

Editors, CI systems, the future web UI, and external tools need structured real-time test events. The current JSON strings are assembled ad hoc and are not defined as a versioned protocol.

Proposed work

  • Define typed events for run, suite, test, hook, output, retry, and coverage lifecycle data.
  • Serialize events through the standard JSON facilities with correct escaping.
  • Add a protocol version and compatibility policy.
  • Let JSON output, UI broadcasting, and test history share the same event model.
  • Document the schema with examples.

Acceptance criteria

  • All event JSON is generated from typed structures rather than string interpolation.
  • Arbitrary test names and error messages are escaped correctly.
  • Schema fixtures or contract tests cover every event type.
  • Consumers can detect the protocol version.
9 days ago

Implemented and rebase-merged in #27. The PR passed format, documentation, coverage, Ubuntu, macOS, and Windows CI.

Sign in to comment on this issue.