【问题标题】:NUnit with .NetCore - Can I write test results to xml or trx fileNUnit with .NetCore - 我可以将测试结果写入 xml 或 trx 文件吗
【发布时间】:2020-07-22 23:43:36
【问题描述】:

我有一个在 .Net Core 框架中开发的测试项目(NUnit)

以下是参考资料。

  <ItemGroup>
    <PackageReference Include="nunit" Version="3.12.0" />
    <PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0"/>
  </ItemGroup>

我可以从下面的命令提示符执行测试

dotnet test \Tests.csproj

结果显示在屏幕上。但是我希望将报告保存在 xml 或 trx 文件中。

非常感谢任何帮助。

【问题讨论】:

标签: unit-testing .net-core command-line nunit


【解决方案1】:

dotnet 测试 --logger trx

它存在于 MS docs dotnet 测试中

【讨论】:

    猜你喜欢
    • 2017-09-21
    • 2015-09-24
    • 1970-01-01
    • 2016-05-04
    • 2013-05-17
    • 1970-01-01
    • 1970-01-01
    • 2010-09-14
    • 2020-10-23
    相关资源
    最近更新 更多