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
Not sure if this is an SDK or xunit bug, but I thought I should report it here. Running xunit tests using an SDK <= v8 results in useful test run information being printed in the console. For a passing run:
Determining projects to restore... Restored C:\Users\eitsarpa\source\repos\Solution\TestProj\TestProj.csproj (in 359 ms). TestProj -> C:\Users\eitsarpa\source\repos\Solution\TestProj\bin\Debug\net8.0\TestProj.dllTest run for C:\Users\eitsarpa\source\repos\Solution\TestProj\bin\Debug\net8.0\TestProj.dll (.NETCoreApp,Version=v8.0)Microsoft (R) Test Execution Command Line Tool Version 17.9.0 (x64)Copyright (c) Microsoft Corporation. All rights reserved.Starting test execution, please wait...A total of 1 test files matched the specified pattern.Passed! - Failed: 0, Passed: 2, Skipped: 0, Total: 2, Duration: 2 ms - TestProj.dll (net8.0)
And for a failing run:
Microsoft (R) Test Execution Command Line Tool Version 17.9.0 (x64)Copyright (c) Microsoft Corporation. All rights reserved.Starting test execution, please wait...A total of 1 test files matched the specified pattern.[xUnit.net 00:00:00.14] TestProj.UnitTest1.Test2 [FAIL][xUnit.net 00:00:00.14] TestProj.UnitTest1.Test1 [FAIL] Failed TestProj.UnitTest1.Test2 [2 ms] Error Message: Assert.True() FailureExpected: TrueActual: False Stack Trace: at TestProj.UnitTest1.Test2() in C:\Users\eitsarpa\source\repos\Solution\TestProj\UnitTest1.cs:line 12 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) Failed TestProj.UnitTest1.Test1 [< 1 ms] Error Message: Assert.True() FailureExpected: TrueActual: False Stack Trace: at TestProj.UnitTest1.Test1() in C:\Users\eitsarpa\source\repos\Solution\TestProj\UnitTest1.cs:line 9 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)Failed! - Failed: 2, Passed: 0, Skipped: 0, Total: 2, Duration: 2 ms - TestProj.dll (net8.0)
However if I try to run the same project using SDK v9.0.100-preview.1.24101.2 I get the following output:
Determining projects to restore... All projects are up-to-date for restore.C:\Program Files\dotnet\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\Users\eitsarpa\source\repos\Solution\TestProj\TestProj.csproj] TestProj -> C:\Users\eitsarpa\source\repos\Solution\TestProj\bin\Debug\net8.0\TestProj.dll
If I try to induce test failures then I get the following output:
Which arguably is less useful and less readable compared to .NET 8 sdk output. (Note that the terminal logger is disabled in both cases, but that doesn't appear to play a big role for this particular case).
To Reproduce
Any xunit test project should do, for this example I created one using the standard xunit template:
Describe the bug
Not sure if this is an SDK or xunit bug, but I thought I should report it here. Running xunit tests using an SDK <= v8 results in useful test run information being printed in the console. For a passing run:
And for a failing run:
However if I try to run the same project using SDK v9.0.100-preview.1.24101.2 I get the following output:
If I try to induce test failures then I get the following output:
Which arguably is less useful and less readable compared to .NET 8 sdk output. (Note that the terminal logger is disabled in both cases, but that doesn't appear to play a big role for this particular case).
To Reproduce
Any xunit test project should do, for this example I created one using the standard xunit template:
Source file:
Further technical details
The text was updated successfully, but these errors were encountered: