Sonar code coverage dropped to 0% after upgrading to Angular 10

Sonar code coverage dropped to 0% after upgrading to Angular 10

SonarQube version: Version 6.7.4 (build 38452) Community Edition

We have an Angular project which was running on Angular 9. We recently upgraded to Angular 10.
With the Angular 10 upgrade, the karma/jasmine related packages were updated. Below is the list of packages (with versions) that were before and after the upgrade. After the upgrade, our sonar code coverage dropped to 0%.
Tried downgrading all the karma/jasmine packages to their earlier versions and then it worked. But this feels like a workaround, because the Angular CLI must’ve upgraded these packages for a reason.

Before the upgrade

    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0"

After the upgrade

    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.0.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0"

Has anyone else faced a similar issue? Can anyone please help me?

Hi @ninadvadujkar , welcome to the community!

I am sorry but SonarQube 6.7 has been deprecated several years ago. You will need to upgrade to SonarQube 8.9 LTS and try to reproduce this issue there before you can obtain help here.

Best regards,
Daniel

1 Like

Thanks a lot for the quick response @Daniel_Meppiel