JetBrains / teamcity-dotnet-plugin

TeamCity plugin for .NET projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.NET Cli output both TeamCity test messages and TRX file for SonarQube.

GrayPockets opened this issue · comments

When using the dotnet .CLI, we can't use a parameter like "--logger trx;LogFileName=results.trx" to output a test result file (for eventual pickup via SonarQube).

Please provide a way to output a test file.

I tried using "--logger trx;LogFileName=results.trx" too. Why is this not working in Teamcity?
I need the reports to hand them to sonarqube - is there another way to do this?

@joergsesterhenn
When I reviewed my logs, I came to the understanding that the dotnet .CLI runner pipes the results into a specialized logger that disallows any other loggers so that it can send the results to TeamCity.

As a work-around I had to switch to command line to create the file for SonarQube and use the "XML Report Processing" build feature to import the unit test results back into TeamCity.

Thanks, will try this too.

Using --logger:trx in command line parameters is now available since TeamCity 2023.05.1 (the commit).

Previously, it can not be done because of microsoft/vstest#2368

Closing the issue for now. Please, feel free to reopen, if you need help