且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我们正试图将我们的项目从VS2008转移到VS 2017

更新时间:2023-09-19 17:07:40

嗨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


相关阅读

推荐文章