We are using Sonarqube 7.5 developer edition. When I do analysis on new code not able to see the coverage. If it is zeron aslo it has to show 0% but not showing. it is just showing ‘–’
Please reply asap.
Thanks in advance.
If we could have live chat it would be great. Because I can see lot if errors.
Hi,
There’s not a lot of context here. Is this thread relevant: Code coverage not displaying on PR analysis? Or are we talking about a long-lived branch? And if so, how many new lines are there?
Ann
These are short lived branches. lines of code is 400k
Hi,
Your project has an overall line count of 400k, or your short-lived branch has 400k new/changed lines?
Ann
Yeah. It has 400k. Is it code coverage shows only on longlived or ?
Hi,
Where in the interface are you seeing this “-” for coverage? Also, since the treatment of SLBs and PRs is much the same, I’ll ask again whether perhaps this thread is relevant for you: Code coverage not displaying on PR analysis
Ann
We are not doing any PR analysis only branch analysis.
The master has 400k lines now with the short lived has 390k lines of code. Task is executing but when it is doing Analysis on SonarServer in background tasks, it is not doing analysis.
Please help me. I’m getting lot of errors. ASAP
Hi,
I don’t understand this. Are you shifting the topic from missing information to actual errors? If so, it would be best to start a new thread that includes those error messages.
Ann
Hi Ann,
It is the same issue. because it is not doing background task analysis with short lived branches. So thats y it is not showing code coverage. Plz reply ASAP
I have been facing since two weeks.
Hi,
Your screenshot doesn’t show any background tasks in failure. The background tasks are being processed.
In fact, the reason I was asking earlier about new lines in the branch - not total Lines of Code in the Project, but the number of Lines of Code changed in the PR - is because if you have no changed Lines of Code then you naturally won’t have coverage metrics, because there’s no way to cover a comment line, for instance.
Here’s a screenshot of a PR I did recently that’s remarkably similar to yours:
In fact, there’s nothing in this PR that’s considered “code”, so it’s quite natural that there’s no coverage information.
Ann
But when we goes to measures section it is showing expected code coverage (before it was 5.4% of coverage), but the coverage is not showing with code.
Yeah, me too:
What you’re seeing is the “Estimated after merge coverage”. Not coverage of the PR/SLB.
Ann
Yeah, It is showing estimated coverage is 6.2% means there are new bugs in new code. But it is not showing the full analysis.