VSTest/MSTest tests results not displayed

791 views
Skip to first unread message

pawel....@motorolasolutions.com

unread,
Nov 24, 2017, 9:12:55 AM11/24/17
to SonarQube
Hi,
I'm configuring SonarQube for C# project and I have a problem with displaying unit tests results, i.e. test cases count is displayed, but their results are not. Test coverage is displayed properly.
I have found Stack Overflow question describing the same issue - https://stackoverflow.com/questions/46291849/mstest-pass-fail-report-in-sonarqube - not answered unfortunately.

I'm running the following commands for testing purpose:
SonarQube.Scanner.MSBuild.exe begin /k:"Test2" /d:sonar.host.url="#" /d:sonar.login="#" /d:sonar.cs.vscoveragexml.reportsPaths="*.coveragexml" /d:sonar.cs.vstest.reportsPaths="TestResults\*.trx" /v:"Test1" /d:sonar.verbose=true

then of course msbuild, and then:
cmd /c """CodeCoverage.exe"" collect /output:""Tests.coverage"" ""vstest.console.exe"" /TestCaseFilter:TestCategory=UnitTest /Logger:trx ""Tests.dll"""

cmd /c "CodeCoverage.exe" analyze /output:"Tests.coveragexml" "Tests.coverage"

SonarQube.Scanner.MSBuild.exe end /d:sonar.login="#"

Thanks, Paweł

Amaury Leve

unread,
Nov 24, 2017, 9:32:02 AM11/24/17
to pawel....@motorolasolutions.com, SonarQube
Hi Pawel,

Not entirely sure what you mean by "their results are not".
Are you talking about having the right number of unit tests but a text saying "No results" (see enclosed screenshot)?

If so then this is a missing feature for C# for which we have a ticket: https://github.com/SonarSource/sonar-csharp/issues/886

If not could you be a bit more specific?

Cheers,
image.png

Amaury

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/178ec653-754e-41a6-83ba-1ccff24454c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Amaury Levé | SonarSource

Software Developer - .Net Team

http://sonarsource.com


Are you using SonarLint in your IDE? 

Pawel Slowik

unread,
Nov 24, 2017, 9:39:27 AM11/24/17
to Amaury Leve, SonarQube
Hi Amaury,
Yes, this is what I meant. Okay, I thought I'm doing something wrong.
Thank you.
--

Paweł Słowik

Software Developer

Motorola Solutions, Inc.


E: pawel....@motorolasolutions.com


Amaury Leve

unread,
Nov 24, 2017, 9:51:35 AM11/24/17
to Pawel Slowik, SonarQube
We have planned to work on this soon so stay tuned to our RFF :)

bsange...@gmail.com

unread,
Apr 10, 2018, 11:03:22 PM4/10/18
to SonarQube
Hello ,
I am using mstest ( 2 test projects ) under one solution and sonar doesnt read lines of code and shows as 0 .

Could you please help ??

Thanks
Gita

Amaury Leve

unread,
Apr 11, 2018, 10:19:20 AM4/11/18
to bsange...@gmail.com, SonarQube
Hi Gita,

Please open a separate thread for your issue. We will also need more information to help you. Like what is your version of SonarQube, version of SonarC#, version of the Scanner for MSBuild?

Cheers,
Amaury

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

sangeeta kamble

unread,
Apr 11, 2018, 10:41:11 AM4/11/18
to Amaury Leve, SonarQube
Done ..
I have created a different thread ..Please help me at the earliest.. I have this issue since few months ..


SonarQube 7.0 is not reading MSTest/TestProject and display lines of code as 0


On Wed, Apr 11, 2018 at 9:19 AM, Amaury Leve <amaur...@sonarsource.com> wrote:
Hi Gita,

Please open a separate thread for your issue. We will also need more information to help you. Like what is your version of SonarQube, version of SonarC#, version of the Scanner for MSBuild?

Cheers,
Amaury

On Wed, Apr 11, 2018 at 5:03 AM <bsange...@gmail.com> wrote:
Hello ,
I am using mstest ( 2 test projects ) under one solution  and sonar doesnt read lines of code and shows as 0 .

Could you please help ??

Thanks
Gita

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages