Skip to content

Avoid printing stdout/stderr properties in console#7600

Open
Youssef1313 wants to merge 4 commits intomainfrom
dev/ygerges/polluted-output
Open

Avoid printing stdout/stderr properties in console#7600
Youssef1313 wants to merge 4 commits intomainfrom
dev/ygerges/polluted-output

Conversation

@Youssef1313
Copy link
Member

  • This matches VSTest behavior.
  • It was also reported internally.

cc @dgkanatsios

Copilot AI review requested due to automatic review settings March 24, 2026 12:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns Microsoft.Testing.Platform’s terminal reporting with VSTest behavior by stopping the console/terminal reporter from rendering per-test captured stdout/stderr, and removing the now-unused localized resource entries.

Changes:

  • Remove printing of StandardOutputProperty / StandardErrorProperty in terminal test completion output.
  • Remove StandardOutput / StandardError string resources from PlatformResources.resx and all .xlf translations.
  • Update terminal reporting call chain to no longer flow stdout/stderr into TerminalTestReporter.TestCompleted.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf Removes translated StandardOutput/StandardError entries.
src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx Removes the StandardOutput/StandardError resource keys from the source resx.
src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.cs Stops extracting stdout/stderr properties and stops passing them to terminal reporting.
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs Removes stdout/stderr parameters and removes rendering of those sections from terminal output.

Comment on lines 326 to 336
internal void TestCompleted(
string testNodeUid,
string displayName,
TestOutcome outcome,
TimeSpan? duration,
string? informativeMessage,
string? errorMessage,
Exception? exception,
string? expected,
string? actual,
string? standardOutput,
string? errorOutput)
string? actual)
{
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TerminalTestReporter.TestCompleted no longer accepts standardOutput/errorOutput, but there are existing internal call sites in unit tests (e.g., TerminalTestReporterTests) still passing those arguments and asserting on the corresponding console output. This will break compilation and/or fail tests; update the tests and expected output to reflect that stdout/stderr are no longer rendered.

Copilot uses AI. Check for mistakes.
@Youssef1313
Copy link
Member Author

@copilot Run SimpleAnsiTerminal_OutputFormattingIsCorrect and AnsiTerminal_OutputFormattingIsCorrect and fix the failure. You should only update the expectation of the test, don't change product code.

Copy link
Contributor

Copilot AI commented Mar 24, 2026

@Youssef1313 I've opened a new pull request, #7601, to work on those changes. Once the pull request is ready, I'll request review from you.

…err removal (#7601)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 24, 2026 13:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

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.

3 participants