从命令行运行自动测试MSTest\ VSTest.Console.exe\ TCM.exe

来源:互联网 发布:淘宝书店推荐 编辑:程序博客网 时间:2024/05/18 09:58
http://technet.microsoft.com/zh-cn/interopmigration/ms182486

Visual Studio 2012 包含用于测试目的的以下命令行工具:

  • VSTest.Console.exe 可以使用 VSTest.Console.exe 程序从命令行运行自动测试和编码的 UI 测试。VSTest.Console.exe 针对性能进行了优化,并在 Visual Studio 2012 中代替 MSTest.exe。

  • MSTest.exe 可以使用 MSTest.exe 程序从命令行运行测试程序集中的自动测试。MSTest 用于负载测试和与 Visual Studio 2010 测试项目的兼容性。 MSTest 还可用于查看这些测试运行的测试结果,将结果保存到磁盘中,以及将结果保存到Team Foundation Server中。

  • TCM.exe Tcm.exe 是一个命令行实用工具,可利用该工具执行以下任务:

    1. 将自动测试导入到测试计划

    2. 从命令行运行作为测试计划一部分的测试

    3. 导入测试或运行测试时查看要使用的测试项及其相应 ID 列表

    还可以通过测试环境从命令行使用 tcm.exe 运行具有关联的自动化的测试用例。 

VS2012

"D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe" /testcontainer:D:\codes\Test\Test\bin\Debug\Tests1.dll  /TestSettings:D:\codes\Tests1\Local.testsettings
mstest.exe /testmetadata:D:\codes\Test\Tests1.vsmdi /testlist:l2


VS2013

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\mstest.exe" /testcontainer:E:\svn\test\testcodes\bin\Debug\TestCodes.dll


VSTest.Console.exe E:\svn\test\testcodes\IVRVerificationCodes\TestVerificationCodes\TestVerificationCodes\bin\Debug\TestVerificationCodes.dll




0 0