简体   繁体   中英

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

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.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM