Lcov javascript coverage not working

Hi People!

I have almost finished setting up my entire CI/CD pipeline using Azure Devops and Sonarcloud! The last kink is test coverage reporting via lcov. Similar to: Lcov file not found I receive the following debug output:

08:36:10.306 WARN: No coverage information will be saved because LCOV file cannot be found.
08:36:10.306 WARN: Provided LCOV file path: **/coverage/lcov.info. Seek file with path: D:\a\1\s\CompanyNamehere.Site.Dashboard\**\coverage\lcov.info
08:36:10.307 WARN: No coverage information will be saved because all LCOV files cannot be found.

The configuration I setup in a previous setup task is:

# Additional properties that will be passed to the scanner, 
# Put one key=value per line, example:
# sonar.exclusions=**/*.bin
sonar.javascript.lcov.reportPaths=**/coverage/lcov.info
sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml

I have dumped the disk to attempt to see if the lcov.info file exist on the system and here is my dir and pwd output:

C:\Users\UserNameHere\Desktop\s\CompanyNamehere.Site.Dashboard\ClientApp\coverage

dir

15/07/2020  03:21 PM    <DIR>          .
15/07/2020  03:21 PM    <DIR>          ..
15/07/2020  03:21 PM            40,190 cobertura-coverage.xml
15/07/2020  03:21 PM    <DIR>          lcov-report
15/07/2020  03:21 PM            12,399 lcov.info

I have also attempted to specify the sonar.cs.opencover.reportsPaths to be absolute and this didn’t work either.

Any ideas?

Cheers
Michael.

Hi @fgfmichael

Could you try to add at first an Azure variable like $(System.DefaultWorkingDirectory) at the beginning of the path ? That may help to deduce the correct path.

Mickaël