We have just integrated our project into SQaaS. We do not have unit tests in the code yet, so the Code Coverage is showing 0 which is ok but the issue we are facing is SonarQube Project is also failing due to this. so i skip the code coverage test by adding the option /d:sonar.coverage.skip=true to the command executed in the .gitlab-ci.yml file. I noticed two different results in the analysis displayed in the MR:
As shown in the screenshots, why am I not seeing the desired result: “No data about Coverage (0.0% Estimated after merge)” for all created MRs?
Could you please explain to me why it avoids taking the test coverage in one case and not in the other? and how i can skip the coverage without editing the quality gate.
For your information, we are using SQaaS version 10.2.1.
Thanx for advance.
I’m not familiar with SQaaS. Could you point me to it, please?
I’m also not familiar with this analysis parameter:
What you want to do is remove coverage from your Quality Gate. That’s what you’re seeing at the top of your first screenshot: you have a condition in your Quality Gate on Coverage on New Code. Remove that (or set the threshold to 0), and you’ll stop getting this failure.
Regarding the contrast between your two screenshots / projects, I think this is the difference between no coverage data (the bottom screenshot is explicit about this) and coverage data that shows no coverage.
IIRC, when you don’t provide any coverage reports (bottom screenshot) we assume you don’t care about coverage, and don’t enforce coverage requirements.