VUn中的xUnit和测试输出(到日志)

时间:2018-06-05 02:25:42

标签: c# testing azure-devops xunit

我有一个.NET Standard 2.0库和xUnit测试项目。测试在本地运行良好(调试和发布,它有不同的设置),然后它发布到VSTS时不起作用。因此,当它在那里运行时,我需要一些跟踪/记录之王。如何使用xUnit能够在VSTS日志中看到测试输出?

测试如下:

public class BlobHelperShould : TestBase
{
    public BlobHelperShould(ITestOutputHelper output) : base(output)
    {
        LoggerFactoryFixture loggerFactoryFixture = new LoggerFactoryFixture();
        // ... skip
    }

    // ... and then the tests go here

}

所以我有ITestOutputHelper可用。但是,如果我使用WriteLine,我就无法在VSTS日志中获得任何内容。

0 个答案:

没有答案