Test coverage - Python & Sonarqube

Hello team! I need some help on my unit test coverage. Even creating the file sonar-project.properties and coverage.xml, my coverage keeps 0%. do you have any guess about the reason? I’m using sonarqube integrated on Github.

Hi,

Welcome to the community!

Are you passing your coverage report in to analysis?

And if so, can you share your analysis logs?

It’s possible you have path mis-matches between your coverage report and the paths analysis is actually seeing.

A few things to check:

  • do the paths in your report actually exist on your build agent?
  • if the paths are relative, where do they start from? Inside your analysis directory, or somewhere above it?

 
Ann