gpt4 book ai didi

c# - 如何在 Windows 上安装 NUnit 3 控制台并运行测试?

转载 作者:可可西里 更新时间:2023-11-01 02:59:55 28 4
gpt4 key购买 nike

我想从这样的控制台运行测试(在任何目录中,DLL 文件可以用于不同的 .NET 版本):

$ nunit3-console test.dll

我在谷歌上搜索了很多,但找不到如何设置它。

官方教程没有任何用处,完全为零。跟随它让我无处可去:https://github.com/nunit/docs/wiki/Installation

最佳答案

很难找到,因为有很多过时的文档,无论是针对 NUnit2 还是 NUnit3。

步骤:

  1. 官方 NUnit3 控制台安装程序在这里:https://github.com/nunit/nunit-console/releases (路径与文档中的不同)
  2. 下载NUnit.Console-*.msi包并安装
  3. 将此添加到系统 PATH 变量:C:\Program Files (x86)\NUnit.org\nunit-console
  4. 打开命令行
  5. 类型:

    $ nunit3-console test.dll

//要并行运行多个测试程序集,请参阅: https://stackoverflow.com/a/45486444/1453525

关于c# - 如何在 Windows 上安装 NUnit 3 控制台并运行测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45482507/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com