Skip to content

feat(output): report terminal program status (OSC 7501) for run and init - #414

Merged
roxblnfk merged 2 commits into
1.xfrom
feat/terminal-program-status
Nov 17, 2026
Merged

roxblnfk merged 2 commits into
1.xfrom
feat/terminal-program-status

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

🔍 What was changed

  • vendor/bin/testo run reports its state to the terminal through OSC 7501 program status: working with a percent while tests run, then done or error from the run result.
  • vendor/bin/testo init reports blocked while a prompt waits for an answer, then done or error.
  • New TestSuitesLocated event: fires once with the final suite list (--suite applied), before the first suite is scanned.

How it works

  • The percent goes in segments: an equal share per located suite, a suite's share per test case, a case's share per test. Every suite and case start moves it to its own segment start, so a miscount stays local.
  • The status is written only to an interactive TTY (on Windows, only with VT processing on). It is off for --json, --teamcity, --quiet, --no-ansi and NO_COLOR.
  • TESTO_TERMINAL_STATUS=0 turns it off everywhere.

Checklist

Documentation

  • docs/spec/events-naming.md, skills testo-plugin-author and testo-run-tests.

Limitations

  • No status through composer test on Windows: Composer pipes a script's output, so Testo sees no terminal. Run vendor/bin/testo directly.

…re the first suite runs

Suites are scanned one at a time, so before this event nothing could size a run-wide progress indicator. It carries the final suite list with `--suite` already applied, and the first scan still comes after it.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk requested a review from a team as a code owner November 17, 2026 12:00
@roxblnfk
roxblnfk force-pushed the feat/terminal-program-status branch 3 times, most recently from 0643010 to 5bfdd97 Compare November 17, 2026 13:19
@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.53125% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
core/Output/Terminal/ProgramStatus.php 90.62% 3 Missing ⚠️
core/Event/TestSuite/TestSuitesLocated.php 0.00% 2 Missing ⚠️
bridge/symfony-console/src/Command/Init.php 95.23% 1 Missing ⚠️
core/Output/Terminal/Renderer/RunStatus.php 97.82% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@roxblnfk
roxblnfk force-pushed the feat/terminal-program-status branch from 5bfdd97 to 4330065 Compare November 17, 2026 13:22
… `init`

The percent goes in segments: an equal share per suite, a suite's share per test case, a case's share per test. Each suite and case start resets it to its own segment start, so a miscount does not carry over. The status is written only to an interactive terminal (on Windows, only with VT processing on). It is off for quiet and plain output, and `TESTO_TERMINAL_STATUS=0` turns it off.

Refs #413

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk force-pushed the feat/terminal-program-status branch from 4330065 to 41b4c79 Compare November 17, 2026 15:04
@roxblnfk
roxblnfk merged commit bd251a4 into 1.x Nov 17, 2026
31 checks passed
@roxblnfk
roxblnfk deleted the feat/terminal-program-status branch November 17, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report terminal program status (OSC 7501) for run and init

1 participant