-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add support for IMessageSink #246
Conversation
This enables logging in extensibility classes such as fixtures and discoverers. See https://xunit.net/docs/capturing-output#output-in-extensions for more information. All classes were modeled after the similar classes for `ITestOutputHelper`. The only method impossible to replicate was `public static ILoggingBuilder AddXUnit(this ILoggingBuilder builder)`.
Codecov Report
@@ Coverage Diff @@
## main #246 +/- ##
==========================================
- Coverage 99.12% 97.87% -1.26%
==========================================
Files 8 15 +7
Lines 342 517 +175
==========================================
+ Hits 339 506 +167
- Misses 3 11 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good - just a few comments.
xunit.abstractions 2.0.2 and xunit.extensibility.execution 2.4.0 are the first versions to support .NET Standard 2.0
Co-authored-by: Martin Costello <martin@martincostello.com>
Thanks for your excellent code review, I hope I addressed all your concerns. |
Thanks for this change @0xced! I'm doing to do few tests to bump the code coverage up a bit now I've been shamed by the bot, and then I'll prep a new release with this change in it by the end of Monday. |
Awesome! 🥳 After you increase the code coverage, you might want to try mutation testing with Stryker Mutator. This could reveal that even with a high coverage the tests might not test as much as you'd think. Here's a quick how-to:
I just tried and the current score is 68.81 % so there's some room for improvement. 😉 |
This enables logging in extensibility classes such as fixtures and discoverers. See https://xunit.net/docs/capturing-output#output-in-extensions for more information.
All classes were modeled after the similar classes for
ITestOutputHelper
. The only method impossible to replicate waspublic static ILoggingBuilder AddXUnit(this ILoggingBuilder builder)
.