Unble to get code coverage in sonarqube

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

log

Test Suites: 13 passed, 13 total
Tests: 82 passed, 82 total
Snapshots: 0 total
Time: 6.97 s
Ran all test suites.
e[32;1m$ sonar-scanner -Dsonar.host.url=$SONAR_HOST_URL_PROD -Dsonar.login=$SONAR_TOKEN_PROD -Dsonar.projectKey="$PROJECT_KEY$CI_PROJECT_NAME" -Dsonar.projectName="$CI_PROJECT_NAME" -Dsonar.projectVersion=$CI_PIPELINE_ID -Dsonar.qualitygate.wait=true -Dsonar.javascript.lcov.reportPaths=$CI_PROJECT_DIR/coverage/lcov.info -Dsonar.coverage.jacoco.xmlReportPaths=$(find “$(pwd)” -path ‘jacoco.xml’ | sed 's/./&/’ | tr ‘\n’ ‘,’)e[0;m
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.11 AdoptOpenJDK (64-bit)
INFO: Linux 4.4.0-1052-aws amd64
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.6.0
INFO: Default locale: “en_US”, source code encoding: “UTF-8” (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=200ms
INFO: Server id: 5BB0EF2D-AXbNAVAWZiu8O7b5Pbw5
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=114ms
INFO: Load/download plugins (done) | time=3988ms
INFO: Process project properties
INFO: Process project properties (done) | time=1ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=2ms
INFO: Project key: 247solutions-filter-service
INFO: Base dir: /builds/247-cloud-apps/247-dataflow/filter-service/test
INFO: Working dir: /builds/247-cloud-apps/247-dataflow/filter-service/test/.scannerwork
INFO: Load project settings for component key: ‘247solutions-filter-service’
INFO: Load project settings for component key: ‘247solutions-filter-service’ (done) | time=34ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=70ms
INFO: Auto-configuring with CI ‘Gitlab CI’
INFO: Load active rules
INFO: Load active rules (done) | time=934ms
INFO: Indexing files…
INFO: Project configuration:
INFO: Load project repositories
INFO: Load project repositories (done) | time=46ms
INFO: 13 files indexed
INFO: 58 files ignored because of scm ignore settings
INFO: Quality profile for js: Sonar way Recommended
INFO: ------------- Run sensors on module filter-service
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=65ms
INFO: Sensor CSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: ‘sonar.coverage.jacoco.xmlReportPaths’ is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms
INFO: Sensor JavaScript analysis [javascript]
INFO: 13 source files to be analyzed
INFO: Version of TypeScript used during analysis: 3.8.3
INFO: 3/13 files analyzed, current file: filterServiceJest.spec.js
INFO: 13/13 source files have been analyzed
INFO: Sensor JavaScript analysis [javascript] (done) | time=16235ms
INFO: Sensor JavaScript/TypeScript Coverage [javascript]
WARN: No coverage information will be saved because LCOV file cannot be found.
WARN: Provided LCOV file path: /builds/247-cloud-apps/247-dataflow/filter-service/coverage/lcov.info. Seek file with path: /builds/247-cloud-apps/247-dataflow/filter-service/coverage/lcov.info
WARN: No coverage information will be saved because all LCOV files cannot be found.
INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=2ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=1ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=4ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=4ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=1ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=28ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 13 source files to be analyzed
WARN: Shallow clone detected, no blame information will be provided. You can convert to non-shallow with ‘git fetch --unshallow’.
INFO: SCM Publisher 0/13 source files have been analyzed (done) | time=4ms
WARN: Missing blame information for the following files:

Hi @Dhananjay, welcome to the SonarSource Community!

I think that explains your missing coverage!

any solution for this issue , because it is generating the lcov info file in the path but still it is not published