Code Coverage and Unit Tests are not showing up in the Sonarqube

After getting the error “Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.” I added this property “sonar.exclusions=**/*.java” and the build is now successfully running but now the coverage got disappeared itself and Unit Tests are also not counted in the Sonarqube.
image

Coverage comes from the lcov.info, right? And I have even placed this file and given path directly in the properties, its not even in any of the directory:

Analysis Properties:
sonar.projectKey=hk-backend-evolved
sonar.projectName=hk-backend-evolved
sonar.sources=.
sonar.host.url=
sonar.login=
sonar.javascript.lcov.reportPaths=lcov.info
sonar.exclusions=**/*.java

Hey there.

What do the logs say?

Here are the logs:
Logs.txt (10.5 KB)

Hey there.

It looks like the coverage information isn’t found.

INFO: Sensor JavaScript/TypeScript Coverage [javascript]
INFO: No LCOV files were found using ./coverage/lcov.info
WARN: No coverage information will be saved because all LCOV files cannot be found.

Are you sure it exists where you expecrt before running the SonarQube analysis?

Hey,
Now I have updated the path but still the same issue.
I have placed the lcov.info file openly:
image

Analysis Properties:
sonar.projectKey=hk-backend-evolved
sonar.projectName=hk-backend-evolved
sonar.sources=.
sonar.host.url=http://144.126.147.143:9000
sonar.projectVersion=1.0
sonar.login
sonar.exclusions=**/*.java
sonar.javascript.lcov.reportpaths=lcov.info
sonar.sourceEncoding=UTF-8

Logs:
Logs.txt (11.9 KB)

The logs you’ve shared don’t actually show the coverage report being produced. It should be reproduced on each run, not checked into the source control. I would refer to the documentation on Javascript/TypeScript code coverage

The essential requirements are that the tool produces its report in the LCOV format and writes it to a place from which the scanner can then pick it up.

Its happening after deployment on server
When i was done with the deployment, the coverage got disappeared itself from the sonarqube project dashboard?

I’m sorry, I don’t understand your response.

Coverage reporting / SonarQube analysis is being done after the deployment?

Coverage reporting / SonarQube analysis were done before the deployment
After deployment coverage is not showing up

After Deployment:

Before Deployment I had Services in my job folder:

Coverage is coming from the services that are now deployed, so is any other option?