【发布时间】:2015-11-05 16:23:58
【问题描述】:
我编写了一堆使用TestCaseAttribute 的单元测试。当我使用 ReSharper 单元测试运行程序时,这些测试在我的本地机器上运行良好。不幸的是,当我使用 NUnit VS Adapter 2.0.0.0 通过 Visual Studio 运行测试时,我得到以下输出:
------ Run test started ------
NUnit VS Adapter 2.0.0.0 executing tests is started
Loading tests from D:\Projects\Ever\WebApp\Ever.UnitTests\bin\Debug\Ever.UnitTests.dll
Exception System.Reflection.AmbiguousMatchException,
Exception thrown executing tests in
D:\Projects\Ever\WebApp\Ever.UnitTests\bin\Debug\Ever.UnitTests.dll
NUnit VS Adapter 2.0.0.0 executing tests is finished
========== Run test finished: 0 run (0:00:00.8290488) ==========
我们使用 Visual Studio Online 托管的构建服务器进行构建,并且依靠测试适配器来运行我们的 NUnit 单元测试。这意味着我需要找到一种方法来使这个属性与属性一起工作(非常优选),否则我必须解决这个限制。
【问题讨论】:
标签: unit-testing nunit azure-devops vs-unit-testing-framework parameterized-tests