[英]How to call VSTEST.CONSOLE.EXE from batch file
I have unit test class library. 我有单元测试类库。
ABC.dll
Now I have to execute it from .bat
file: 现在我必须从.bat
文件执行它:
start %comspec% /k ""C:\Program Files\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" x86
After that I have to add my dll ... with it like 之后,我必须添加我的dll ...
VSTEST.CONSOLE.EXE C:/ABC.dll /logger:trx
How can i achieve this? 我怎样才能做到这一点? Please guide me kindly 请好心地指导我
Call vstest.console.exe
within your batch file, and pass the DLL as a command line argument. 在批处理文件中调用vstest.console.exe
,然后将DLL作为命令行参数传递。
Example .BAT: 示例.BAT:
start cmd /k ""%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "C:/ABC.dll" /Logger:trx"
Note: Edit it, so the path to vs.test.console.exe
is correct for whatever version of VS you have installed. 注意:编辑它,因此vs.test.console.exe
的路径对于已安装的VS版本都是正确的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.