Description
When running tests using dotnet test, the --logger parameter does not seem to generate the expected result file. The command:
dotnet test --no-restore --test-adapter-path:. --logger:"junit;LogFilePath=C:\path\{assembly}-test-result.xml;MethodFormat=Class;FailureBodyFormat=Verbose"
fails to produce the expected JUnit test result file.
Environment Details
-
Test Logger: JunitXml.TestLogger 6.1.0
-
XUnit.v3: 2.0.0
-
.NET Version: net8.0
-
Operating System: Windows 11
Steps to Reproduce
Install JunitXml.TestLogger version 6.1.0.
Run dotnet test with the --logger parameter as shown above.
Check if the result file is generated at the specified path.
Expected Behavior
The test result file should be generated successfully when specifying the --logger parameter.
Actual Behavior
No result file is created.
Additional Context
The official documentation (https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test) does not explicitly state that the --logger parameter is supported when using dotnet test.
Is support for --logger planned in future versions of dotnet test?
If not, what is the recommended approach to generating JUnit test results when using dotnet test?
Thank you!