我们正试图将我们的项目从VS2008转移到VS 2017 [英] We are trying to shift our project from VS2008 to VS 2017

查看:192
本文介绍了我们正试图将我们的项目从VS2008转移到VS 2017的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要使用exe文件在自定义环境中执行测试。


要运行特定测试,我们可以从测试资源管理器中选择测试并将其保存在播放列表中然后使用该播放列表运行测试,但由于vsmdi文件用于运行测试,我无法从播放列表运行测试。



cd D:\\git \\03a \\ Source \\ \\\XYZ \\ Common \\Services \\Development\ \ Test
& D:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ serif; font-size:12.8px"> x86-Mono \\Debug \\ UnitTest。 exe
/ testmetadata:D:\\git \\03a \\
Source \\\ \\ XYZ \\Common \\ Services \\ Development\\Test\\Test.vsmdi
/ runco​​nfig:D:\ \git\\03a\\ \
来源\\XYZ \\Common \\Services \\ 开发\\Test \\Test。 testrunco​​nfig
/ searchpathroot:d:\\git \\03a \\
Build \\bin\\XP-x86-mono \\ Debug \\
/ TestList:L4



现在正在使用来自vsmdi的TestList。


如何使用播放列表?

解决方案

嗨Abhiprae Choudhury,


欢迎来到MSDN论坛。


据我所知,VS2013中删除了
测试列表。因此,我们无法在VS2017中运行它。


并且,播放列表功能在VS IDE中,我的意思是我们可以在
测试资源管理器窗口中使用它,但是它不支持命令行。


如果你想使用
MSTest.exe 来运行播放列表,也许
测试类别对您有所帮助。您可以添加" TestCategory("A")"该方法的属性,然后,使用下面的命令行:


MSTest.exe / testcontainer:[文件名] /类别:[测试类别过滤器]




问候,


Judyzh


Tests need to be executed in a customized environment using an exe file.

To run specific tests, we can select tests from test explorer and save it in a playlist and then use that playlist to run the tests but since vsmdi file was being used to run the test I am not being able to run the test from playlist.

cd D:\\git\\03a\\Source\\XYZ\\Common\\Services\\Development\\Test & D:\\git\\03a\\Build\\bin\\XP-x86-Mono\\Debug\\UnitTest.exe /testmetadata:D:\\git\\03a\\Source\\XYZ\\Common\\Services\\Development\\Test\\Test.vsmdi /runconfig:D:\\git\\03a\\Source\\XYZ\\Common\\Services\\Development\\Test\\Test.testrunconfig /searchpathroot:d:\\git\\03a\\Build\\bin\\XP-x86-mono\\Debug\\ /TestList:L4

Right now TestList is being used from vsmdi.

How to use playlist ?

解决方案

Hi Abhiprae Choudhury,

Welcome to the MSDN forum.

As far as I know, the Test List has been removed in VS2013. So, we could not run it in VS2017.

And, playlist feature is in the VS IDE, I mean that we could use it in Test Explorer window, but it doesn't support the command line.

If you want to use MSTest.exe to run playlist, maybe Test Categories would be helpful for you. You could add "TestCategory("A")" attribute to the method, then, use command line below:

MSTest.exe /testcontainer:[file name] /category:[test category filter]

Regards,

Judyzh


这篇关于我们正试图将我们的项目从VS2008转移到VS 2017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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