<PackageReference Include="NUnit" Version="3.5.0" />

TestOutput

public class TestOutput
The TestOutput class holds a unit of output from a test to a specific output stream
namespace NUnit.Framework.Interfaces { public class TestOutput { public string Text { get; set; } public string Stream { get; set; } public string TestName { get; set; } public TestOutput(string text, string stream, string testName) { Text = text; Stream = stream; TestName = testName; } public override string ToString() { return Stream + ": " + Text; } public string ToXml() { if (TestName == null) return $"""{Stream}""{Text}"""; return $"""{Stream}""{TestName}""{Text}"""; } } }