mstest.exe找不到任何测试



我有一个Selenium Specflow C#项目,我可以从测试Explorer和通过Resharper单元测试Explorer执行测试。

但是,当我运行命令行以执行测试时(这就是詹金斯执行测试的方式)

它在dll

中找不到任何测试
mstest /testcontainer:MoneyUITests.dll /test:NavigateToLoans
Microsoft (R) Test Execution Command Line Tool Version 15.0.26621.2
Copyright (c) Microsoft Corporation. All rights reserved.
Loading MoneyUITests.dll...
Test NavigateToLoans cannot be found.
Test NavigateToLoans cannot be found.
Starting execution...
No tests to execute.

不确定我做错了什么,Visual Studio设法找到并执行了没有问题的测试似乎很奇怪。

这是因为mstest.exe在Visual Studio 2010中用于测试由于Visual Studio 2012,您应该使用vstest.console.exe。

您是否尝试过使用vstest.console.exe而不是mstest.exe?

我已经在Stackoverflow上找到了这个答案:在命令提示中如何运行Selenium c#test的答案?

最新更新