Node.js feature tests not forming part of coverage percentage

javascript
sonarqube
coverage

(Matt Davies) #1
  • sonarqube 6.7.4
  • feature tests being counted in the coverage
  • sonarjs5

Hi everyone

Very new to sonarqube, so please bear with me.

We’ve got a node.js app that is being analysed by our sonarqube server, no problem there, picking up all the vulnerabilities etc etc using serverjs.

There are feature tests in the projectdir/tests/e2e/features folder of the app, but coverage is always set to %0.

Is there a way I can get sonarqube to register these tests, and then register if we’re adding more as we add more code?

Thanks

Matt Davies


(Colin Mueller) #2

Hey Matt,

SonarQube does not produce coverage reports, only consumes them. Have you tried passing coverage reports as documented in the SonarJS plugin documentation?

Colin


(Matt Davies) #3

Thanks for getting back to me Colin

Righto, so create the coverage reports with LCOV first, then pass them into sonarqube!

Next step, work out how to do that :slight_smile:

Thanks again

Matt