Typescript test coverage not displaying on sonarqube UI

I am not able to get my test coverage on sonarqube inspite of following the rules to write the script.
can someone please help me in this and tell me where am I going wrong

I could see the vulnerabilities and hotspot but not the test coverage
its showing as 0


Welcome to the community!

I don’t see in that screenshot (BTW, we really don’t like screenshots. Copy/pasted text is much preferred! :smiley:) where you’re generating a coverage report or passing a report into analysis.

SonarCloud doesn’t figure out what is and is not tested. It just shows you what your coverage reports say.


Hi Ann,
Thank you for the quick response.
I am using a configuration like this

      - name: Unit Tests
          run: yarn test

      - name: Prepare SonarQube Scanner
         run: |
           wget -O sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-
           unzip sonar-scanner.zip
           mv sonar-scanner- sonar-scanner

      - name: Analyze with SonarQube
            SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          uses: sonarsource/sonarcloud-github-action@master
            args: >

When I use a lcov.info viewer it shows the coverage but on sonarqube UI it shows 0%


Thanks for the configuration. Can you share 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.

This guide will help you find them.