Skip to content

Display combined coverage even when Threshold is not exceeded #95

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

Closed
ptupitsyn opened this issue May 13, 2018 · 4 comments
Closed

Display combined coverage even when Threshold is not exceeded #95

ptupitsyn opened this issue May 13, 2018 · 4 comments

Comments

@ptupitsyn
Copy link

Threshold allows us to fail a build when coverage drops beyond certain percentage.
This percentage is combined from all modules involved.

It would be great to see this percentage even when Threshold is not used or exceeded.

@StephenMP
Copy link
Contributor

StephenMP commented May 14, 2018

Hi @ptupitsyn, If I understand your suggestion correctly, this is already implemented, there just hasn't been a new release containing this new code yet :) Not sure when @tonerdo plans to create another release.

The new code will show you something like the following on every test run:

+---------------+--------+--------+--------+
| Module        | Line   | Branch | Method |
+---------------+--------+--------+--------+
| coverlet.core | 90.6%  | 86.7%  | 93.8%  |
+---------------+--------+--------+--------+

@ptupitsyn
Copy link
Author

Line, Branch and Method details are awesome!

I am talking about something like this though:

| Module                  | Coverage |
|-------------------------|----------|
| A.B.C                   | 80.5%    |
| Foo.Bar                 | 50.0%    |
| Baz.Qux                 | 60.0%    |
|-------------------------|----------|
| Average                 | 63.5%    |

Because when I set /p:Threshold, I get errors like

Overall average coverage '63.5%' is lower than specified threshold '70%'.
So this number, 63.5%, is only visible when there is a Threshold error.

@StephenMP
Copy link
Contributor

Oh I see what you mean. I think this is a duplicate of #29

StephenMP added a commit to StephenMP/coverlet that referenced this issue May 20, 2018
…rage coverage % for all coverage types
tonerdo added a commit that referenced this issue Jun 9, 2018
@tonerdo
Copy link
Collaborator

tonerdo commented Jun 12, 2018

Available in relase: https://www.nuget.org/packages/coverlet.msbuild/2.0.1

@tonerdo tonerdo closed this as completed Jun 12, 2018
NorekZ pushed a commit to NorekZ/coverlet that referenced this issue Nov 8, 2018
…rage coverage % for all coverage types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants