mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Add support for logging to an xUnit ITestOutputHelper #423
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @siewers on GitHub (May 20, 2022).
Is your feature request related to a problem? Please describe.
When using xUnit, it would be nice to be able to log the output from WireMock to the test output helper.
Describe the solution you'd like
Introduce a new
WireMock.Net.XUnitproject and create a TestOutputHelperWireMockLogger class, for logging to anITestOutputHelper.Describe alternatives you've considered
Keeping the implementation in my own code base.
Is your feature request supported by WireMock (java version)? Please provide details.
Not to my knowledge, no. XUnit is a .NET testing framework, so there is no direct Java equivalent.
Additional context
This is the implementation I'm currently using:
@StefH commented on GitHub (May 20, 2022):
https://github.com/WireMock-Net/WireMock.Net/pull/759
@StefH commented on GitHub (May 20, 2022):
@siewers
How to use this in the xunit test ?
Or is just referencing the new project enough?
@siewers commented on GitHub (May 20, 2022):
It should be sufficient to reference the project.
Normally you already have a reference to xUnit, but since it can't write to the console, you need to use the
ITestOutputHelper.