arcus-azure / arcus.testing

Reusable testing components used during Arcus testing.
https://testing.arcus-azure.net/
MIT License
5 stars 2 forks source link

Create `NUnitTestLogger` as an alternative for the current `XunitTestLogger` #99

Closed stijnmoreels closed 5 months ago

stijnmoreels commented 5 months ago

Is your feature request related to a problem? Please describe. Currently, we provide an ILogger conversion from xUnit's ITestOutputWriter, but no NUnit version.

Describe the solution you'd like Create a NUnitTestLogger variant that writes successful logs to the TestContext.Out and failures to the TestContext.Error output streams.

Since NUnit has no separate Nuget package with abstractions, like xUnit does; it might be beneficial to now include the entire NUnit framework here, but have TestWriter values in the constructor instead, so that people can do this:

using NUnit;

ILogger logger = new NUnitTestLogger(TestContext.Out /*, TestContext.Error <- overload to separate errors*/);

Additional context https://docs.nunit.org/articles/nunit/writing-tests/TestContext.html