How to run Coded UI test file from Visual Studio command prompt using batch file? -
@echo off @setlocal enableextensions @cd /d "c:\program files\microsoft visual studio 10.0\common7\ide" start %comspec% /k ""c:\program files\microsoft visual studio 10.0\vc\vcvarsall.bat"" mstest /testcontainer:c:\testdir\test.dll code shown above runs vs command prompt , changes directory "c:\program files\microsoft visual studio 10.0\common7\ide" mstest.exe is. last line doesn't run in vs command prompt window, opens new window , tries run in new opened window. can how run ui test file in opened vs command prompt using batch file?
i run coded ui tests following batch script:
@echo off :: running tests without vs enterprise possible if install test agent package: https://msdn.microsoft.com/en-us/library/dd648127.aspx set test_runner="c:\program files (x86)\microsoft visual studio 14.0\common7\ide\commonextensions\microsoft\testwindow\vstest.console.exe" set test_dlls="c:\location\compiled\tests\project.codedui.test.dll" :: if tests set these comma separate test cases run :: set tests="test1,test2" set tests="" if %tests% == "" ( %test_runner% %test_dlls% > codeduitestresults.txt ) else ( %test_runner% %test_dlls% /tests:%tests% ) pause the visual studio number should replaced per different version
- vs2015: 14.0
- vs2013: 12.0
- etc
Comments
Post a Comment