gpt4 book ai didi

c# - 如何为给定项目禁用 NUnit 适配器?

转载 作者:太空狗 更新时间:2023-10-29 20:26:58 25 4
gpt4 key购买 nike

自从我安装了 NUnit Adapter,对于所有项目,即使不使用 NUnit,发现过程仍在进行。

------ Discover test started ------
NUnit Adapter 3.2.0.0: Test discovery starting
Exception NUnit.Engine.NUnitEngineException, Exception thrown discovering tests in I:\src\...
Cannot run tests in process - a 32 bit process is required.
NUnit Adapter 3.2.0.0: Test discovery complete
========== Discover test finished: 0 found (0:00:00.1180118) ==========

如何禁止 NUnit 发现给定项目的测试?

最佳答案

我很确定每次构建时您安装的所有测试适配器都会为所有程序集运行,NUnit 只是有点冗长,这很烦人。

如果 Test Explorer 窗口未打开,则不会发现测试。不幸的是,关闭窗口是不够的,您需要关闭它,然后重新启动 Visual Studio。

更新:根据评论,还要确保未选中保持测试执行引擎运行


以下是我运行 Visual Studio 2015 Update 2 的系统;

测试资源管理器窗口关闭,重建所有;

No tests in output

注意,下拉列表中没有测试发现或测试。也可以在Test | 中看到测试设置,因为菜单选项被禁用,测试引擎没有运行。

Tests not running

然而,一旦我打开Test Explorer

Tests now in output

即使我关闭了窗口,测试也会继续被发现,直到我重新启动 Visual Studio。

关于c# - 如何为给定项目禁用 NUnit 适配器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37831087/

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