On .NET Core 8 with xUnit (Abstractions version 2.0) when we write test output to the TestOutputHelper
, every line that's written to the output - see screenshot (1) - counts as a "Warning", see screenshot (2), in the Visual Studio 2022 test explorer.
Is this an oversight from Microsoft to not funnel this into a "Log", "Information" or other non-warning, non-error counter, or are we doing something wrong? There is nothing like a "log level" at play, we are simply calling the void WriteLine(string message)
method on the test output helper.
Another sample, here it can be seen that only the first message is actually a warning:
Versions:
- xunit 2.9.0
- xunit.runner.visualstudio 2.8.2
This is my xunit.runner.json content
{
"diagnosticMessages": true,
"shadowCopy": false
}
xunit
andxunit.runner.visualstudio
packages, thexunit.runner.json
if present, the.csproj
of the test project, etc.