当我降低到3.10时,它可以工作,并且不确定为什么最近才停止。我尝试的所有方法都无法正常工作。
这是输出中显示的内容。我尝试了许多在线找到的选项,但似乎无济于事:
[13/03/2019 17:10:44 Informational] ------ Run test started ------
[13/03/2019 17:10:45 Informational] NUnit Adapter 3.13.0.0: Test execution started
[13/03/2019 17:10:45 Informational] Running all tests in E:\xxx\xxx\xxx.Tests\bin\Debug\xxx.Tests.dll
[13/03/2019 17:10:45 Informational] NUnit failed to load E:\xxx\xxx\xxx.xxx\bin\Debug\xxx.Tests.dll
[13/03/2019 17:10:45 Informational] NUnit Adapter 3.13.0.0: Test execution complete
[13/03/2019 17:10:45 Warning] No test matches the given testcase filter `FullyQualifiedName=xxx.xxx.xxxTestss.xxxxnameshouldbesomething` in E:\xxx\xxx\xxx.Tests\bin\Debug\xxx.Tests.dll
[13/03/2019 17:10:45 Informational] ========== Run test finished: 0 run (0:00:01.6716706) ==========
我也创建了一个基本测试来确认:
Imports NUnit.Framework
Imports Should
<TestFixture()>
Public Class UnitTest1
<Test()> Public Sub TestMethod1()
Dim b As Boolean = False
b.ShouldBeFalse
End Sub
End Class
我尝试删除TestFixture,将其重命名为TestClass(但我需要使用NUnit!)
太奇怪了……解决方案中有一个可以正常工作的项目也无济于事,我找不到任何区别。
我什至试图创建一个新的空项目……但这甚至不适用于任何版本的NUnit(但我认为我将把它作为一个单独的问题提出)。
答案 0 :(得分:0)
由于某种原因发现问题,对于我的项目,Microsoft.VisualStudio.QualityTools.UnitTestFramework标志“ Copy Local”被设置为false。
当我将其更改为true时,我的测试现在就开始运行:)
版本3.10似乎不需要此功能,这就是为什么在降低版本时它会重新开始工作。
(我不认为设置此标志会影响本地运行)