Pass parameter to testsettings setup script

折月煮酒 提交于 2019-12-25 04:12:10

问题


I am using MTM to run Tests using a specific "Test Settings".

I added a Setup script which is a batch file and its working fine. The batch file is

echo %1 %2

Now I am not able to figure out how to pass argument to this batch file.

I tried all the below methods, but the test run throws illigal character in path, incorrect file format, etc. errors.

C:\SetupScript.bat Hello World
"C:\SetupScript.bat" Hello World
"C:\SetupScript.bat" "Hello" "World"
start "" "C:\SetupScript.bat" Hello World

I am not able to figure out how to pass arguments to my batch file in Setup script. Please help.


回答1:


I was also trying the same stuff, but it seems this is no currently possible through MTM. I am using MTM 2012.



来源:https://stackoverflow.com/questions/27100187/pass-parameter-to-testsettings-setup-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!