c# - xUnit and test output in VSTS (to logs)
问题描述
I have a .NET Standard 2.0 library and xUnit test project for it. The test runs fine locally (Debug and Release, it has different settings) and then it doesn't work when published to VSTS. So I need some king of tracing/logging when it runs there. What to use with xUnit to be able to see test output in the VSTS logs?
The test looks like this:
public class BlobHelperShould : TestBase
{
public BlobHelperShould(ITestOutputHelper output) : base(output)
{
LoggerFactoryFixture loggerFactoryFixture = new LoggerFactoryFixture();
// ... skip
}
// ... and then the tests go here
}
So I have ITestOutputHelper
available. But if I use WriteLine
I don't get anything in VSTS logs.
解决方案
推荐阅读
- r - 在 R 中查找两个数据帧之间的差异
- c# - 如何保存列表
在 Unity 中便于检索 - javascript - 在 JavaScript 中重构 JSON?
- docker - docker-compose up with cassandra 容器不返回
- c# - 如何避免首先在 EF 代码中插入基于多个字段的重复条目
- r - 与州空间数据框不同,创建县空间数据框会生成单行数据框作为输出
- matplotlib - xlsxwriter:如何加载使用 matplotlib.pyplot 创建的 BytesIO png 文件
- aws-cli - 将 aws cli SES 作为文件附件发送
- php - 无法在 PHP 中输出 JSON 数据数组
- firebase - 基于其他文档的 Firestore 安全规则