Document terminal progress console output limitation#54825
Open
Evangelink wants to merge 1 commit into
Open
Conversation
Explain that the animated ANSI progress bar controls the terminal cursor and can overwrite output written directly to stdout/stderr outside the capture path, distinguish it from captured per-test output, and recommend --progress off or --ansi off. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f83bc790-aebc-4529-b99c-96670c94444a
Contributor
There was a problem hiding this comment.
Pull request overview
Documents a Microsoft.Testing.Platform (MTP) terminal-output limitation where the ANSI animated progress bar redraw can overwrite direct stdout/stderr writes that bypass the framework’s capture pipeline.
Changes:
- Updated
ms.date. - Added a Direct console output and progress redraw subsection under Progress explaining the overwrite behavior.
- Added guidance to disable progress (
--progress off) or switch away from ANSI redraw behavior (--ansi off) to keep direct console output visible.
Show a summary per file
| File | Description |
|---|---|
| docs/core/testing/microsoft-testing-platform-terminal-output.md | Adds documentation about direct console output being overwritten by ANSI progress redraw, plus mitigation guidance and date refresh. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
Comment on lines
+48
to
+50
| This behavior is distinct from *captured* per-test standard output and error. Text that a test writes while it runs is captured by the framework and shown according to `--show-stdout` and `--show-stderr`, so the animated progress bar doesn't overwrite it. | ||
|
|
||
| If your code must write directly to the console and you need that output to remain visible, use `--progress off` to disable the animated progress bar. Alternatively, `--ansi off` switches to the append-only progress renderer, which writes progress as new lines instead of redrawing in place and so doesn't overwrite prior direct output. |
Evangelink
enabled auto-merge (squash)
July 17, 2026 14:53
Member
Author
|
Please review @gewarren |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents a terminal-output limitation of Microsoft.Testing.Platform (MTP) discussed in microsoft/testfx#4425.
The animated ANSI progress bar takes control of the terminal cursor and repeatedly redraws the bottom of the screen. As a result, text written directly to
stdout/stderroutside the test framework's capture path — for example aConsole.WriteLinefrom assembly-level or session-level lifecycle code (Before(Assembly),Before(TestSession)) or from an extension — can be overwritten or removed during redraw.This is distinct from captured per-test standard output/error, which the framework captures and displays according to
--show-stdout/--show-stderrand is therefore not overwritten by the progress bar.Changes
docs/core/testing/microsoft-testing-platform-terminal-output.md.--progress offwhen code must write directly to the console, and mentions--ansi offas the append-only progress renderer that writes new lines instead of redrawing in place.ms.date. The article already carriesai-usage: ai-assisted.Fixes context from microsoft/testfx#4425.
Internal previews
[!INCLUDE dotnet-content]
Internal previews