Run unit tests and get Code Coverage in SQ-Project

(Igor Pfeifer) #1


  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 7.4
    SonarScanner 2.8.1 Jenkins
    SonarC# 7.8

  • what are you trying to achieve
    View the CodeCoverage on project.

  • what have you tried so far to achieve this
    The project which is build is a single c# solution (.NET 4.7.2 and .NET Standard 2.0) which also contains our unit tests.
    According to the documentation it should be enough that the test projects have “Test” at the end of the project name. We have this. Name example “Tool.DataSource.Database.Test”

So why is the code coverage still 0.0%.
What do I have to do to get the unit tests noticed by the scan?
Is there a tutorial or something like this? I didn’t found some.

Thanks a lot.