Joelty
Joelty

Reputation: 2009

how to write to Test or Debug tab of Visual Studio with xUnit

I have this code:

private readonly ITestOutputHelper _output;

public Test(ITestOutputHelper output)
{
    _output = output;
}

[Fact]
public void Test1()
{
    _output.WriteLine("TEST OUTPUT");
}

but I'm not sure why output (TEST OUTPUT) isn't logged anywhere

Test, is of course passing.

I'm using .NET Core 2.1

Upvotes: 0

Views: 115

Answers (1)

Euphoric
Euphoric

Reputation: 12849

In the VS Test Explorer, select this test. In the details pane, click "Open additional output for this result". This should open new window with test's output.

enter image description here

Upvotes: 1

Related Questions