I am using SonarQube for a Javascript project. In dashboard I see Unit test success 100.0%, but I don't see a value for Unit Test Coverage.
I am creating a LCOV file using JSCover, and passing it to Sonar in the sonar-project.properties file:
sonar.javascript.lcov.reportPath=app-test/target/phantom/jscover.lcov
It seems to me that sonar runner is reading the correct file during the execution:
...
10:17:47.111 INFO - Sensor LCOVSensor...
10:17:47.112 INFO - Analysing C:\Users\Ubi60\.jenkins\jobs\T2Client\workspace\app-test\target\phantom\jscover.lcov
10:17:47.131 INFO - Sensor LCOVSensor done: 20 ms
...
Here are a few lines from my jscover.lcov file:
SF:C:/Users/Ubi60/.jenkins/jobs/T2Client/workspace/app-test/target/phantom/Dashboard/app/store/DeviceDataStore.js
FNF:0
FNH:0
DA:4,1
DA:10,14
DA:12,14
DA:13,1
end_of_record
SF:C:/Users/Ubi60/.jenkins/jobs/T2Client/workspace/app-test/target/phantom/Dashboard/app/store/FollowUnitStore.js
FNF:0
FNH:0
DA:4,1
DA:10,14
DA:12,14
DA:13,1
end_of_record
...
I already tried to revert the slashes in paths, but with no luck.
Any suggestion?
The setting name seems to be sonar.javascript.lcov.reportPath s . I have:
sonar.javascript.lcov.reportPaths=coverage/lcov.info
And I get my coverage.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.