Closed dnbr2002 closed 5 years ago
@dnbr2002 glad this extension helped! This extension just creates a test run log confirming to xunit xml format. It seems Sonarqube has better integration with xunit xml than trx :)
yes it's just not clear in dotnet docs the behavior when using trx and trying to create xml. I don't know if it was because I was xunit and not vstest or what. But it was creating a weird trx file like below even when I specified mytests.xml as the output file.
TestResults/_cl-asl-3175_2018-11-27_18_08_56.trx
Was this happening because shell interprets ;
as a command delimiter? May be try the following:
dotnet test /mytestProj.csproj --logger:"trx;LogFileName=mytests.xml"
I thought of that when I saw your note about the quotes in your readme. It's possible. I'll try it next week maybe.
So I was having a lot of issues getting sonarqube working properly in Jenkins with C# apps until I found this package. Based on some logs I was seeing I did not trust that trx was creating proper xml, even know MS docs said I should be able to do that. I was specifying logger xml files like so from my dotnet test commands.
dotnet test /mytestProj.csproj --logger trx;LogFileName=mytests.xml
But I was still seeing trx files in my jenkins log. So I installed your package, changed my command like so
dotnet test /mytestProj.csproj --test-adapter-path:. --logger:"xunit;LogFilePath=test_result.xml"
And boom that file was right where it was supposed to be and all was well with SonarQube. So I'd really just like to know what you did sir. :) I already starred the repo. It made my day. Maybe update the readme so people understand what or why they need this thing instead of trx?? Trx bad!