[英]xUnit Tests skipped
In my VS2017
solution I have several unit test projects. 在我的VS2017
解决方案中,我有几个单元测试项目。 In on of them my xUnit
tests do not get discovered by mstest
and therefore are not run. 在他们看来,我的xUnit
测试不会被mstest
发现,因此不会运行。
I do get the warning: 我收到了警告:
Warning: [xUnit.net 00:00:00.7641189] Skipping: Testing.UnitTests (could not find dependent assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0') 警告:[xUnit.net 00:00:00.7641189]跳过:Testing.UnitTests(找不到依赖程序集'Microsoft.VisualStudio.QualityTools.UnitTestFramework,Version = 10.0.0')
But Microsoft.VisualStudio.QualityTools.UnitTestFramework is referenced in the project in exactly that version. 但Microsoft.VisualStudio.QualityTools.UnitTestFramework在项目中完全引用该版本。 I have multiple unit testing projects. 我有多个单元测试项目。 Many of them contain xUnit tests as well, but they get found and executed without any problems. 它们中的许多都包含xUnit测试,但它们可以毫无问题地被找到并执行。
All projects containing xUnit tests have the same xUnit nuget packages assigned, especially xunit.runner.visualstudio
包含xUnit测试的所有项目都分配了相同的xUnit nuget包,尤其是xunit.runner.visualstudio
I am also using NCrunch and NCrunch has no problem discovering and execution the xUnit tests in question. 我也在使用NCrunch和NCrunch在发现和执行有问题的xUnit测试时没有问题。
What could possibly be the reason to my problems? 可能是我的问题的原因是什么?
Further Findings: 进一步的发现:
All together looks quite odd to me... 对我来说,一起看起来很奇怪......
I had this issue but am not sure if this is exactly the same as yours. 我有这个问题,但不确定这是否和你的完全相同。 I saw an error in the output/tests window which stated it couldn't restore package xunit.runner.utility 2.2.0 我在输出/测试窗口中看到一个错误,表示它无法恢复包xunit.runner.utility 2.2.0
After manually adding this in in package manager console like so: 在包管理器控制台中手动添加后,如下所示:
install-package xunit.runner.utility -v 2.2.0
It started working again 它又开始工作了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.