Console reporter with colors, real-time progress, inline failures #13

Closed
opened 2026-04-11 10:55:39 +00:00 by charles · 0 comments
Owner

User story

As a test author running locally, I want pretty test output that updates as tests complete and shows failures in context, so that I can spot regressions at a glance without scrolling through walls of log.

Acceptance criteria

Format

  • Output matches spec §5.1 layout exactly:
    • Header: Starting <binary>... OK (X.Xs) and Connecting to WebSocket... OK
    • Per-test lines: PASS module::name (0.1s) / FAIL ... / SKIP ... (reason)
    • Failure block indented: shows Expected:, Got:, Context:, and at <file:line>
    • Summary: N passed, N failed, N skipped (XX.Xs)
  • Each line is printed as soon as the test completes; stdout is flushed.

Colors

  • Uses the colored crate: green PASS, red FAIL, yellow SKIP.
  • Bold totals in summary.
  • Honours --no-color flag and the NO_COLOR env var (per https://no-color.org).
  • Auto-detects whether stdout is a TTY; pipes default to no color.

Failure detail

  • Failure block shows the full TestError::Assertion fields plus the location.
  • For non-assertion errors (Timeout, Connection, RpcError), the block adapts: shows the relevant fields with similar layout.
  • Verbose mode (-v) appends a tail (last 50 lines) of harness stdout/stderr on test failure (not on every test).

Header

  • Header includes harness startup time (the wall time between spawn and health-pass).

References

  • Spec §5.1
## User story As a **test author running locally**, I want pretty test output that updates as tests complete and shows failures in context, so that I can spot regressions at a glance without scrolling through walls of log. ## Acceptance criteria ### Format - [ ] Output matches spec §5.1 layout exactly: - Header: `Starting <binary>... OK (X.Xs)` and `Connecting to WebSocket... OK` - Per-test lines: ` PASS module::name (0.1s)` / ` FAIL ... ` / ` SKIP ... (reason)` - Failure block indented: shows `Expected:`, `Got:`, `Context:`, and `at <file:line>` - Summary: `N passed, N failed, N skipped (XX.Xs)` - [ ] Each line is printed as soon as the test completes; stdout is flushed. ### Colors - [ ] Uses the `colored` crate: green PASS, red FAIL, yellow SKIP. - [ ] Bold totals in summary. - [ ] Honours `--no-color` flag and the `NO_COLOR` env var (per https://no-color.org). - [ ] Auto-detects whether stdout is a TTY; pipes default to no color. ### Failure detail - [ ] Failure block shows the full `TestError::Assertion` fields plus the location. - [ ] For non-assertion errors (`Timeout`, `Connection`, `RpcError`), the block adapts: shows the relevant fields with similar layout. - [ ] Verbose mode (`-v`) appends a tail (last 50 lines) of harness stdout/stderr on **test failure** (not on every test). ### Header - [ ] Header includes harness startup time (the wall time between spawn and health-pass). ## References - Spec §5.1
charles added this to the v0.1.0 milestone 2026-04-11 10:55:39 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/ws-rpc-test#13
No description provided.