【问题标题】:`dotMemoryUnit` with `dotnet test``dotMemoryUnit` 和 `dotnet test`
【发布时间】:2020-05-12 13:11:18
【问题描述】:

我通常使用dotnet test 运行我的单元测试。我使用的框架是xunit。因此,我不确定如何使用 CLI 运行 dotMemory 单元测试。

文档建议:

dotMemoryUnit.exe
-targetExecutable="C:\NUnit 2.6.4\bin\nunit-console.exe"
-returnTargetExitCode --"E:\MyProject\bin\Release\MainTests.dll"

我应该在-targetExecutable 中输入什么?它需要一个路径,因此输入 dotnet test 不起作用。

【问题讨论】:

    标签: .net-core xunit dotmemory


    【解决方案1】:

    我尝试使用最新的 dotMemory Unit 3.1 运行测试,它可以工作

    dotMemoryUnit.exe "c:\Program Files\dotnet\dotnet.exe" -- test "path\to\the\solution.sln"

    你的版本应该是

    dotMemoryUnit.exe -targetExecutable="c:\Program Files\dotnet\dotnet.exe" -returnTargetExitCode -- test "E:\MyProject\bin\Release\MainTests.dll"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-20
      • 1970-01-01
      相关资源
      最近更新 更多