SonarQube says "Not covered by tests" for most of lines

Viewed 18913

I'm evaluating SonarQube Developer for our development team, and facing most of the lines are tagged as "Not covered by tests".

I suppose "not covered" means "not checked or not tested". Am I guess right?

Please let me know the exact meaning of "not covered" and why this happens.

Below are the background info. of this evaluation.

  • SonarQube 7.3 (BuildWrapper and SonarScanner for Windows)
  • C/C++ Project using Qt 5.9

Screenshot of SonarQube Console

1 Answers

SonarQube reads code coverage reports and marks which lines have been tested (covered by tests). not covered means that those lines are not included in the code coverage reports. There are two options, your tests:

  1. don't check the code from the screen
  2. check the code from the screen, but the code coverage report:
    • didn't include data of these tests
    • has not been generated and uploaded to the server

Documentation about SonarQube Test Coverage & Execution.

Related