spekt / xunit.testlogger

XUnit logger for vstest platform
MIT License
73 stars 15 forks source link

Running dotnet test produces almost empty xml log file #41

Closed menaheme closed 10 months ago

menaheme commented 1 year ago

Running the following command with VS 2022 installed,on a project with ~1500 unit tests:

dotnet.exe test --logger:xunit

output in terminal (removed paths):

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Results File: C:\Development\XXXX\TestResults\TestResults.xml

Passed! - Failed: 0, Passed: 1531, Skipped: 0, Total: 1531, Duration: 1 m 43 s -XXXX.UnitTests.dll (net48)

produces and almost empty xml file. file contents:

<assemblies timestamp="11/03/2022 10:58:32" />

this used to work a while ago with a complete log file, my guess is the upgrading to .net 6 / vs 2022 messes this up.

any help would be apprecieated

menaheme commented 1 year ago

maybe this is because vs 2022 is the first vs to be x64 ?

Siphonophora commented 1 year ago

@menaheme No, I don't think it has to do with visual studio or .net 6.

Because you are getting an empty file it seems the logger is being called but not receiving messages each time a test is completed. I suspect the issue is with the issue is with the versions of the other nuget packages you are using in the test project. Could you share what they are? Or perhaps the ones there aren't compatable with .net 4.8? You mentioned upgrading to .net 6, but the test log still says 4.8

codito commented 10 months ago

Closing due to inactivity. Please reopen as appropriate.