Build Agent(VS 2015)无法发现MSTest V2测试(持续集成和夜间构建) [英] Build Agent (VS 2015) cannot discover MSTest V2 tests (continuous integration and nightly builds)

查看:229
本文介绍了Build Agent(VS 2015)无法发现MSTest V2测试(持续集成和夜间构建)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想安装MS Test V2 Nuget Packages并将其用于解决方案中的单元测试。问题是,如果我安装此软件包并从VS 2015中删除VS UnitTest DLL,则vstest.console.exe无法发现单个测试

I would like to install MS Test V2 Nuget Packages and use them for Unit Tests in the solution. The problem is, if I install this packages and remove VS UnitTest DLL from VS 2015, there is no single test can be discovered by vstest.console.exe

我是否需要安装一些扩展名为Visual Studio 2015 for MSTest V2? MSTest.TestAdapter和TestFramework已经作为nuget包安装。如果我切换回MSTest V1,一切正常。

Do I need install some extension for Visual Studio 2015 for MSTest V2? MSTest.TestAdapter and TestFramework is already installed as nuget packages. If I do switch back to MSTest V1, everything work fine.

项目详细信息:.NET 4.5.2

Project details: .NET 4.5.2

有人有相同或类似的问题吗?

do someone have the same or similar problem?

这里有一些vstest.console.exe的手动测试:

here some manual test with vstest.console.exe:

Microsoft(R)测试执行命令行工具版本14.0.25420.1

Microsoft (R) Test Execution Command Line Tool Version 14.0.25420.1

vstest.console  / ListDiscoverers => no  executor:// mstestadapter / v2 found

vstest.console /ListDiscoverers => no executor://mstestadapter/v2 found

vtest.console test.dll / ListDiscoverers =>没有执行者:// mstestadapter / v2 found

vtest.console test.dll /ListDiscoverers => no executor://mstestadapter/v2 found

Microsoft(R)-Testausf"rungs-Befehlszeilentool Version 15.0.26228.0

Microsoft (R)-Testausf"rungs-Befehlszeilentool Version 15.0.26228.0

vstest.console  / ListDiscoverers => no  executor:// mstestadapter / v2 found

vstest.console /ListDiscoverers => no executor://mstestadapter/v2 found

vtest.console test.dll / ListDiscoverers => executor:// mstestadapter / v2 found,因为Nuget引用了项目

vtest.console test.dll /ListDiscoverers => executor://mstestadapter/v2 found because Nuget referenced to project

推荐答案

嗨罗马,

它是.NET Core测试项目还是其他?

Is it the .NET Core test project or others?

我所知道的MSTest V2与 不同.NET Core 或其他特定项目类型支持的一般测试项目。 

What I know that MSTest V2 is different from general test project which supported on .NET Core or other specific project type. 

我认为您可以获得有关如何引用此包以及如何运行测试的详细步骤在此处使用带有.NET Core应用程序的命令行:

I think you could get the detailed steps about how to refer this package and how to run the test using the command line with the .NET Core app here:

https://blogs.msdn.microsoft.com/visualstudioalm/2016/09/01/announcing-mstest-v2-framework- support-for-net-core-1-0-rtm /

如果您使用vstest.console.exe,请在此处查看此案例:

If you use the vstest.console.exe, please also check this case here:

http://stackoverflow.com/questions/39022741/missing-assembly-when-running-tests-with-mstest-from-the-command-line -for-a-net

最好的问候,

杰克


这篇关于Build Agent(VS 2015)无法发现MSTest V2测试(持续集成和夜间构建)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆