How can I get the number of unit tests to appear on the dashboard?

Hi, I’m trying to get the number of unit tests we have in our code base to appear on the dashboard in Sonarqube Enterprise Edition (Version 8.4.2). Could someone please let me know how to do this?

image

The project is a React codebase and running Jest for the unit tests. I’m using the default lcov coverage reports which look to be working.

Here are the settings in my sonar-project.properties file, is there something incorrect of something that I’m missing?

# must be unique in a given SonarQube instance
sonar.projectKey=removedForExample

# --- optional properties ---

# defaults to project key
sonar.projectName=removedForExample

# defaults to 'not provided'
sonar.projectVersion=1.0.0

# test reports
sonar.javascript.lcov.reportPaths=coverage/lcov.info

# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources=app/src
sonar.sources.exclusions=app/src/**/*.test.ts, app/src/**/*.test.tsx
sonar.tests=app/src
sonar.test.inclusions=app/src/**/*.test.ts, app/src/**/*.test.tsx

# Encoding of the source code. Default is default system encoding
sonar.soureEncoding=UTF-8

Hi,

Welcome to the community!

The SonarQube project homepage isn’t configurable. :woman_shrugging:

And BTW, your version is past EOL. You should upgrade at your earliest convenience. Your upgrade path is:

8.4.2 → 8.9.1 → 9.0 (last step optional)

 
HTH,
Ann