You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests are spamming ITestOutputHelper logs for passing tests #103445
Tests that use ITestOutputHelper are now printing the output even when the test is passing.
For example, if you run dotnet build .\src\libraries\System.Net.Http\tests\FunctionalTests\ /t:Test, the console will print 5000 lines of text even if everything's passing.
Interestingly, other diagnostic info (e.g. how many tests were discovered) has been shown before, so it seems like the config was being honored.
That disappears if I just toggle that config to false.
That output is coming from our default reporter. Maybe you were running with a different reporter? What is the context where you're seeing this? We have several environmentally enabled reporters (mostly for CI environments like AppVeyor, TeamCity, and VSTS/Azure Pipelines).
After the above dependency flow PR is merged the env var will need to be set. I assume that the RunTests.cmd/sh scripts are the right place for xunit.console and the runsettings.targets file for dotnet test.
Activity
MihaZupan commentedon Jun 13, 2024
cc: @ViktorHofer this seems to have regressed with the Arcade update in #103279
ViktorHofer commentedon Jun 14, 2024
Can you please provide an example test that does this and an example console log?
MihaZupan commentedon Jun 14, 2024
Random example:
runtime/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs
Line 4178 in f1f0750
ViktorHofer commentedon Jun 14, 2024
That wasn't the case before? That sounds weird to me. cc @bradwilson (we recently upgraded to xunit 2.8.1)
MihaZupan commentedon Jun 14, 2024
No, you'd only see the output for failing tests.
bradwilson commentedon Jun 14, 2024
You shouldn't be seeing passing tests unless you're using the Verbose reporter.
Let me verify that something hasn't changed on our side.
bradwilson commentedon Jun 14, 2024
Actually, I take it back. This is working as designed.
The code that you're hitting has been there since 2016. We print passing tests if both of these things are true:
It's likely the 2nd thing that's changed for you.
Here's an example:
bradwilson commentedon Jun 14, 2024
(I didn't see it on your provided command line, so I assumed it's been enabled in an
xunit.runner.jsonfile in the source tree.)MihaZupan commentedon Jun 14, 2024
Setting
diagnosticMessagesto false does bring back the previous behavior (not printing output for passing tests),runtime/eng/testing/xunit/xunit.runner.json
Line 2 in f8f4509
but this configuration also hasn't changed over the last 5 years 😕
bradwilson commentedon Jun 14, 2024
Maybe the file wasn't being copied properly and thus never being used? Is it possible that that's a fix that went in recently?
MihaZupan commentedon Jun 14, 2024
Interestingly, other diagnostic info (e.g. how many tests were discovered) has been shown before, so it seems like the config was being honored.
That disappears if I just toggle that config to false.
bradwilson commentedon Jun 14, 2024
That output is coming from our default reporter. Maybe you were running with a different reporter? What is the context where you're seeing this? We have several environmentally enabled reporters (mostly for CI environments like AppVeyor, TeamCity, and VSTS/Azure Pipelines).
MihaZupan commentedon Jun 14, 2024
Local run from a console on Windows
31 remaining items
ViktorHofer commentedon Jul 18, 2024
This needed dotnet/arcade#14930 which is now merged. We are still waiting for dependency flow to bring this change into runtime though: #105301
ViktorHofer commentedon Jul 18, 2024
After the above dependency flow PR is merged the env var will need to be set. I assume that the RunTests.cmd/sh scripts are the right place for xunit.console and the runsettings.targets file for
dotnet test.Set xunit env var to not print output for passing tests
ViktorHofer commentedon Jul 24, 2024
#105392 should fix this. @MihaZupan would you mind trying it out?
Set xunit env var to not print output for passing tests (dotnet#105392)
bradwilson commentedon Jul 25, 2024
🎉
ViktorHofer commentedon Jul 25, 2024
Thanks a lot for your help, Brad 👍
bradwilson commentedon Jul 25, 2024
Glad we could find a good workaround for you!
Set xunit env var to not print output for passing tests (#105392)
Remove support for older LLVM versions, and re-order linker flags (#1…