You’ve given us very little to go on here, but maybe that’s okay because SonarQube only reads the reports you pass in to analysis. So your first step is to make sure the coverage your new tests add is reflected in the Jest report.
If they are, then feel free to come back to us with
your SonarQube version (check the page footer if you’re unsure)
your analysis logs
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
Hello G Ann Campbell
Thank you for your response.
SonarQube Version - Enterprise Edition Version 9.9 (build 65466)
For privacy reasons I can’t share the complete log. May be I will try later to share
What I want to understand is that we are mentioning the lcov report paths in sonar.properties file, do we still need another property such as testExecutionReportPaths. Also do we need any additional dependency in our project which can show reports on Sonar?
JFYI - for now we are using “jest-sonar-reporter”
Each parameter provides different information to analysis. The LCov report parameter provides a coverage report. A test execution report parameter would provide information on test count and test success/failure. You don’t need to provide execution information to have your coverage reflected in SonarQube.
I can see that there is a problem coming for lcov path resolution. There are logs around it which mentions that few paths have not been resolved, there are inconsistencies in the file.
Found inconsistencies in coverage report.
We are specifying the lcov path in sonar properties file as <folder_name_for_coverage>/lcov.info
What could wrong here?
Hello Ann,
The problem is that we have been trying to increase the new code coverage report for which jest test cases have also been written.
In local we see pretty much very good report, but on Sonar we face a huge decline. Therefore we were trying to investigate the plugins used for sonar reports.
Not sure what is wrong there with Sonar, if you can pinpoint the cause, that would be really helpful
After resolving the WARNING on unresolved path I see below in logs -
Problem during processing LCOV report: can't save BRDA data for line 29 of coverage report file (java.lang.IllegalArgumentException: Line with number 61 doesn't belong to file ABC.vue).
These are repetitive and at the end it says 111 inconsistencies found in the report.
Hello Ann,
First of all sorry for the late response.
No we don’t have line 61 in ABC.vue file. Also we are not sure how that information is coming lcov.info as this file is automatically generated by Jest.
This is something may be we need to fix before. If you have any idea around this, that would be highly appreciated.
We are also checking this from our end, will keep you posted if found something.