Code Coverage via Bistbucket


I use SonarQube in Bitbucket and have minor to no experience. I hope this question is not as stupid as I think it is.
As soon as I push new code to my Bitbucket repository , a pipeline will run sonar-scanner.
However, the code coverage in all of my projects stays at 0%. My package.json file looks as follows:

"name": "test",
"repository": {
"type": "git",
"scripts": {
"test": "ng test --watch=false --code-coverage=true",
"sonar": "sonar-scanner"
"engines": {
"node": ">=0.12.0"

Did I forget something?
Do I have to run tests via continuous integration before it even gets that information?

Kind regards,

Hi Johannes,

Welcome to the community!

I know nothing about BitBucket pipeline configuration, but I can say that yes you do need to generate your coverage reports before analysis, and you’ll then need to feed those reports into the analysis.