From 869ae12150efc3f5f9cfda26f5120934822453f8 Mon Sep 17 00:00:00 2001 From: Youssef1313 Date: Mon, 19 Jan 2026 13:54:35 +0100 Subject: [PATCH] Follow-up on disable progress on non-capable terminal --- .../OutputDevice/Terminal/TerminalTestReporter.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs index 992cac2034..98193dcde6 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs @@ -86,6 +86,7 @@ public TerminalTestReporter( _testApplicationCancellationTokenSource = testApplicationCancellationTokenSource; _options = options; + Func showProgress = options.ShowProgress; ITerminal terminal; if (_options.AnsiMode == AnsiMode.SimpleAnsi) { @@ -106,9 +107,13 @@ public TerminalTestReporter( }; terminal = useAnsi ? new AnsiTerminal(console) : new NonAnsiTerminal(console); + if (!useAnsi) + { + showProgress = () => false; + } } - _terminalWithProgress = new TestProgressStateAwareTerminal(terminal, _options.ShowProgress); + _terminalWithProgress = new TestProgressStateAwareTerminal(terminal, showProgress); } public void TestExecutionStarted(DateTimeOffset testStartTime, int workerCount, bool isDiscovery)