SonarQube Community,
When doing an analysis of a Node/JS project the coverage valued reported via istanbul show much different than what gets reported and shows on our SonarQube server. Our SonarQube server is at 4.5.4 Our sonar-runner version is 2.4 The project generated the following report:
Code coverage report for All files
Statements: 67.65% (1520 / 2247) Branches: 49.76% (418 / 840) Functions: 65.13% (269 / 413) Lines: 68.31% (1481 / 2168) Ignored: none
File Statements Branches Functions Lines
classes/ 94.4% (118 / 125) 70% (7 / 10) 100% (9 / 9) 94.35% (117 / 124)
helpers/ 84% (126 / 150) 75.44% (43 / 57) 86.67% (26 / 30) 84.25% (123 / 146)
services/ 82.64% (976 / 1181) 66.67% (272 / 408) 81.63% (160 / 196) 83.26% (955 / 1147)
view_controllers/ 37.93% (300 / 791) 26.3% (96 / 365) 41.57% (74 / 178) 38.08% (286 / 751)
Generated by istanbul at Tue Sep 15 2015 17:01:21 GMT+0000 (UTC)
The coverage values shown in the SonarQube 4.5.4 drill down differ greatly from what the other report shows: ( I apologize for not being able to post an image but I do not have a high enough reputation yet to do this.)
Technical Debt 64d
Issues 5,707
Blocker 0
Critical 3
Major 3,922
Minor 696
Info 1,086
Unit Tests Coverage
28.6%
Line Coverage
25.6%
Condition Coverage
49.8%
SQALE Rating A
Technical Debt Ratio 1.0% The project has warnings on the following quality gate conditions: Coverage 28.6% < 70.0% Critical issues 3 > 0 cd-services-test-Indexing web client cd-services-test-RECORDS-IDX-indexing-web-client Profiles: Sonar way (JavaScript)
Quality Gate: SonarWayWithFindbugsForNFSWithBuildBreaker - java (Default)
Lines Of Code 104,320
JavaScript
Files 426
Directories
109
Lines
120,238
Functions 6,726
Classes
4
Statements
32,377
Accessors
0
Useless Code
18,260
18,260 lines in duplications
Duplications
41.5%
Lines
49,923
Blocks
10,915
Files
89
Complexity
4.9 /function
4.5 /class
29.5 /file
Total: 12,588
If you should need the actual lcov.info file or if you would like pngs of the data above to better analyze this problem I can send them via an e-mail directly to you.
What would you suggest I do to try and track down why there is such a discrepency?
Any thoughts on how I can proceed to get correct data logged would be very much appreciated.
Doug