Not getting the number of unit tests on the sonarqube dashboard?

Hi, I’m trying to get the number of unit tests we have in our code base to appear on the dashboard in SonarQube we are using 9.7.1-community. Could someone please let me know how to do this?
We are also getting coverage mismatch in our SonarQube dashboard and GitHub actions pipeline logs.

Hi,

You may try to use this paramter Test execution parameters & SonarCloud
Let me know of it’s work.


Hi, we are already using this but still not getting Unit test on Sonar console and also have mismatch of coverage percentage.

Hi @Rajat_Kant_jha ,
Did you check the paths to the source files in the lcov and the xml file? Sometimes the paths are not consistent with where the scanner is running from. In this case you have a trace in the logs. You can try to activate verbose mode with sonar.log.level or sonar.verbose parameters.