Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

287
Views
Total number of test cases are not displayed although coverage percentage is displayed in Sonarqube

Technology : Angularjs, sonarqube, Lcov reporter, karma runner,

We have migrated the sonarqube. With earlier sonarqube, the coverage percentage and total number of test cases was displayed in sonarqube using same configuration. But after migrating to new sonar the total number of test cases are not displayed although coverage percentage is shown.

I understand the coverage percentage and total number of test cases should be taken from same lcov file. If coverage percentage is taken from lcov then not sure what is missing to take total number of cases. Please suggest.

karma.conf.js (coverage related configuration)

plugins: [
  'karma-jasmine',
  'karma-coverage',
  'karma-chrome-launcher'
],

preprocessors: {
  'project/ui/app/**/*.js': ['coverage'],
},

reporters: ['progress', 'coverage'],
coverageReporter: {
  dir: 'build/reports/coverage',
  reporters: [
    {type: 'lcov', subdir: 'report-lcov'}
  ]
},

sonar related properties in build.gradle

sonarqube {
    def sonar_host = System.getenv("SONAR_HOST")
    def sonar_login = System.getenv("SONAR_LOGIN")
    def sonar_project_key = System.getenv("SONAR_PROJECT_KEY")
    properties {
       println "SONAR_HOST $sonar_host"
       println "SONAR_LOGIN  $sonar_login"
       property 'sonar.host.url', "${sonar_host}"
       property 'sonar.login', "${sonar_login}"
       property 'sonar.projectKey', "${sonar_project_key}"
       property 'sonar.projectName', "${sonar_project_key}"
       property 'sonar.projectVersion', "${pVersion}"
       property 'sonar.language', 'js'
       property 'sonar.sources', 'project/ui/app'
       property 'sonar.sourceEncoding', 'UTF-8'
       property 'sonar.exclusions', 'excluded js files'
       property 'sonar.test.inclusions', '**/*.spec.js'
       property 'sonar.javascript.lcov.reportPaths', 'build/reports/coverage/report-lcov/lcov.info'
       property 'sonar.verbose', 'true'
       property 'sonar.log.level', 'DEBUG'
    }
}

Sonar Image

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!