Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method Coverage #2

Open
dberry-rcs opened this issue Aug 2, 2021 · 2 comments
Open

Method Coverage #2

dberry-rcs opened this issue Aug 2, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request Parsing An issue reletad to parsing the coverage xml. Summary An issue related to creating the code coverage summary.
Milestone

Comments

@dberry-rcs
Copy link

Feature Request

It would also be useful to have Method coverage reported by the tool.

Expected Behaviour

There would be an additional column that reports Method coverage

Additional Context

Similar to what is printed out by dotnet test:

Calculating coverage result...
Generating report './bin/test-results/coverage.cobertura.xml'

+------------------+--------+--------+--------+
| Module | Line | Branch | Method |
+------------------+--------+--------+--------+
| RCS.Libs.ArgUtil | 93.82% | 95.83% | 92.3% |
+------------------+--------+--------+--------+

+---------+--------+--------+--------+
| | Line | Branch | Method |
+---------+--------+--------+--------+
| Total | 93.82% | 95.83% | 92.3% |
+---------+--------+--------+--------+
| Average | 93.82% | 95.83% | 92.3% |
+---------+--------+--------+--------+

@dberry-rcs dberry-rcs added the enhancement New feature or request label Aug 2, 2021
@irongut irongut added this to To do in Enhancements via automation Aug 5, 2021
@irongut
Copy link
Owner

irongut commented Sep 27, 2021

The Cobertura format doesn't include a method coverage value.

It would be possible while looping through the packages in the coverage file to loop through classes, loop through their methods and count the number of methods with line-rate > 0.0 and total number of methods. Method coverage could then be calculated as the ratio of line-rate > 0.0 : total methods. For a large project this could be slow so would be optional.

@dberry-rcs
Copy link
Author

Optional would be fine.

@irongut irongut added Parsing An issue reletad to parsing the coverage xml. Summary An issue related to creating the code coverage summary. labels Oct 16, 2021
@irongut irongut added this to the vNext+1 milestone Oct 29, 2021
@irongut irongut modified the milestones: vNext, vNext+1 Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Parsing An issue reletad to parsing the coverage xml. Summary An issue related to creating the code coverage summary.
Projects
Development

No branches or pull requests

2 participants