Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestingPlatformCaptureOutput=false does not work with .NET 9.0 SDK #4396

Open
campersau opened this issue Dec 20, 2024 · 1 comment
Open
Labels
Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library External: dotnet test `dotnet test` integration

Comments

@campersau
Copy link

campersau commented Dec 20, 2024

Describe the bug

When running dotnet test -p:TestingPlatformCaptureOutput=false the output of the testing platform is not visible anymore with .NET 9.0 SDK.

Steps To Reproduce

  1. Create a new xUnit v3 project (e.g. https://xunit.net/docs/getting-started/v3/cmdline#create-the-unit-test-project)
  2. Uncomment <TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport> in the csproj
  3. Run dotnet test -p:TestingPlatformCaptureOutput=false

Expected behavior

Output using .NET 8.0 SDK (8.0.404)

dotnet test -p:TestingPlatformCaptureOutput=false
  Run tests: 'MyFirstUnitTests\bin\Debug\net8.0\MyFirstUnitTests.dll' [net8.0|x64]
  xUnit.net v3 Microsoft.Testing.Platform Runner v1.0.0+5b41c61aa1 (64-bit .NET 8.0.11)

  Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 433ms

  Testlaufzusammenfassung: Bestanden! - MyFirstUnitTests\bin\Debug\net8.0\MyFirstUnitTests.dll (net8.0|x64)
    total: 1
    failed: 0
    succeeded: 1
    skipped: 0
    duration: 569ms
  Tests succeeded: 'MyFirstUnitTests\bin\Debug\net8.0\MyFirstUnitTests.dll' [net8.0|x64]

Actual behavior

Output using .NET 9.0 SDK (9.0.101)

dotnet test -p:TestingPlatformCaptureOutput=false
  MyFirstUnitTests Test Erfolgreich (1,6s)

Testzusammenfassung: insgesamt: 1; fehlgeschlagen: 0; erfolgreich: 1; übersprungen: 0; Dauer: 1,4 Sek.
Erstellen von Erfolgreich in 3,7s

Additional context

See also: xunit/xunit#3092 (comment)

Documentation: https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test#show-complete-platform-output

@Evangelink
Copy link
Member

Hi @campersau,

Thanks for raising this issue. I can confirm that terminal logger of .NET 9 is breaking MTP experience... I'll raise the point with SDK team. In the meantime, you can use /tl:false to disable the terminal logger experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library External: dotnet test `dotnet test` integration
Projects
None yet
Development

No branches or pull requests

2 participants