thinh
(Thinh Le)
June 18, 2020, 7:58pm
1
Must-share information (formatted with Markdown ):
I have SonarQube 8.3.1, Scanner 4.3.0, Plugin Swift 4.2.2
I would like to get non-zero Coverage on New Code.
I ran the scanner / analyzer and get 0 % Coverage on New Code (after having fixing some bugs).
Hi @thinh ,
Do you have non-zero coverage on Overall Code? Just to ensure you got some coverage at all.
If no, I assume you have a basic issue with your coverage.
thinh
(Thinh Le)
June 19, 2020, 5:16pm
3
Hi @Daniel.Schiffer ,
We have written Unit Tests extensively, but Sonar Scanner does not see them. I don’t know why our codes are seen as 0% Overall Code coverage. Is it because we have to use the same naming convention, say, methodABC() and its test testMethodABC() ?
ganncamp
(G Ann Campbell)
June 19, 2020, 6:41pm
4
Hi @thinh ,
Welcome to the community!
Are you actually importing a coverage report ?
Ann
thinh
(Thinh Le)
June 19, 2020, 7:10pm
5
Hi @ganncamp ,
The coverage-swift.htm under the directory sonar-reports is empty.
<?xml version='1.0' ?>
thinh
(Thinh Le)
June 19, 2020, 7:16pm
6
Let me try to run the command in your link “importing a coverage report”.