Skip to content Skip to sidebar Skip to footer

Javascript Code Coverage In Sonar

I am kinda newbie in using Sonar and plugins for javascript code coverage. Which are the possibilities to find out the quality (including code coverage) of javascript code when an

Solution 1:

The following discussion covers setting up SonarQube for a javascript project: https://community.sonarsource.com/t/sonarcloud-analysis-for-javascript-application/10591/3

I just went through the process for the first time. The key is getting the lcov.info file, which Elena mentioned can be produced by Karma. The following setting causes the coverage info to be published to your SonarQube project:

sonar.javascript.lcov.reportPaths=coverage/lcov.info

Note the path is relative to the project root.

Solution 2:

  1. Check documentation https://docs.sonarqube.org/display/PLUG/SonarJS (part "Code Coverage")
  2. It's seems that it's possible to use Karma with SQ (as it can produce lcov format)

Post a Comment for "Javascript Code Coverage In Sonar"