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.
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:
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?
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?