当我从测试资源管理器运行SpecFlow+NUnit测试时,所有测试都会运行,即使我只选择了一些测试。
我还看到了这个消息,我怀疑它是相关的:
NUnit3TestExecutor discovered 0 of 1 NUnit test cases using Current Discovery mode, Explicit run
此外,在测试运行之后,它们仍然被标记为";不运行";,即使他们成功了。
如何解决此问题?
我按照https://github.com/nunit/nunit-vs-adapter/issues/125.我不知道为什么它能修复,但它确实修复了。
升级nuget包后,我得到了一个错误:
System.IO.FileLoadException : Could not load file or assembly 'nunit.framework, Version=3.13.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
这是通过以下建议解决的:https://github.com/SpecFlowOSS/SpecFlow/issues/2387: