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

TestOutput

public class TestOutput
The TestOutput class holds a unit of output from a test to a specific output stream
public string Stream { get; }

Get the output type

public string TestId { get; }

Get the id of the test that created the output

public string TestName { get; }

Get the name of the test that created the output

public string Text { get; }

Get the text

public TestOutput(string text, string stream, string testId, string testName)

Construct with text, output destination type and the name of the test that produced the output.

public string ToXml()

Convert the TestOutput object to an XML string