coveragepy icon indicating copy to clipboard operation
coveragepy copied to clipboard

Code Coverage percentage for each sub-directory

Open tanmayzengit opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. I am currently trying to generate a code coverage report for a monolith which gives me the percentage at each file level. What i want is to get the coverage percentage at each directory and sub-directory level.

Describe the solution you'd like

Directory A-------90%
        |
        |Sub-directory A-----------------> 95%
        |                 |File A1--------------------------->90%
                          |File A2--------------------------->100%
        |Sub-directory B-----------------> 85%

I would want something like i have mentioned above if that helps in understanding. Currently i get only the top level percentage and coverage for each file i.e Directory A and File A1 , File A2 if we take the above example with the entire path.

Describe alternatives you've considered For doing the above i am currently using the --include flag to do for some important directories but this method is not feasible for all the directories and sub-directories.

Additional context If there a quick fix to the above will appreciate if someone can let me know or if you can let me know how do i do that using coverage.py will really appreciate. p.s Coverage version--->4.0a6

tanmayzengit avatar Jul 28 '22 10:07 tanmayzengit