Ability to parse JSON pytest coverage to obtain context information

  • ALM used: GitHub
  • CI system used: GitHub
  • Scanner command used when applicable (private details masked): default
  • Languages of the repository: Python

I am looking to find out if there is a way to have sonarcloud parse either the python coverage.py JSON or HTML output.We are looking to pull in the "context information which tells us which tests actually hit which lines of the source code. The XML coverage output report does not contain this information but it can be found in either the JSON or the HTML format which coverage.py can produce.

Hi,

Welcome to the community!

Our docs cover using Coverage.py to generate your coverage reports, but you’re not going to be able to pull in and show data about which tests hit which lines.

We used to do that, but dropped it… a long time ago, and I don’t see it coming back.

 
Ann

Is this limited to just the xml or if you could take in the lcov that is another format or are you say that even if we had the data in the file it wouldn’t be represented?

Hi,

I’m saying that even if the data were there, it wouldn’t show up.

 
Ann