Welcome to SonarSource community. . Hope you’ll like it.
Code coverage is not a concept specific to SonarQube, it’s a general development concept.
Are you aware of it ? If not, you should learn about code coverage in general (or more specifically in your development language, because it’s often a bit language specific) and then you’ll be able to look at how to integrate your code coverage in SonarQube.
Until you understand what is code coverage and you have written unit tests to produce coverage, you should simply ignore code coverage in SonarQube (accept that it is 0%)
I understand that this may fail you r quality gate. To avoid this:
- Copy the Sonar Way quality gate into another name (eg Omkar Quality Gate)
- Remove the criteria on code coverage from the Omkar Quality Gate
- Set Omkar Quality Gate as the default Quality Gate
And you’re good. SonarQube will not require you to get good code coverage to pass the quality gate.