Code coverage for Monorepo is always 0% - Help me in configuring it

Repo Type : Monorepo
CI - Gitlab
Language : Javascript/php/Typescript

I have tried following two:

  1. without specifying the source and tests path in sonar.project.properties file
  2. By specifying the path of source and test path of a specific folder
    Example:
    sonar.sources=monorepo/packages/app1/src/app
    sonar.test=monorepo/packages/app1/tests/unit/app

Can someone help me if it is possible to get test coverage from a monorepo?
Can you help me in this issue? thanks in advance.

Hey @vishwa007,

Is it the case only for Monorepo? Do you have some other projects where you correctly import test coverage information?

Take a look here: https://sonarcloud.io/documentation/enriching/coverage/, this should explain how to import test coverage reports.

Best,
Marcin

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.