MsTest 运行 Jenkins 批处理命令中的特定 TestCase

MsTest Run specific TestCase in Batch command in Jenkins

您好,我在 Jenkins.And 中配置了一个 MsTest 项目,目前当我使用以下批处理命令执行测试项目时,它将 运行 项目中的所有测试用例。

假设我的测试项目中有一个名为 ABC 的测试用例,我如何才能 运行 在 windows 批处理命令中仅使用该特定测试用例在詹金斯。

这是当前命令

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\mstest.exe"
 /testcontainer:"%WORKSPACE%\MYPROJECT\bin\debug\MYTEST.dll" 
/resultsfile:"%WORKSPACE%\result_%BUILD_NUMBER%.xml"

我试过了,但是没用

 "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\mstest.exe"
     /testcontainer:"%WORKSPACE%\MYPROJECT\bin\debug\MYTEST.dll\test:ABC" 
    /resultsfile:"%WORKSPACE%\result_%BUILD_NUMBER%.xml"

您在 MYTEST.dll 和“before ABC" 之后缺少“和 space。试试这个:

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\mstest.exe"
 /testcontainer:"%WORKSPACE%\MYPROJECT\bin\debug\MYTEST.dll" /test:"ABC" 
/resultsfile:"%WORKSPACE%\result_%BUILD_NUMBER%.xml"