0
votes

I have few Ordered tests which I execute locally using the VSTEST.CONSOLE.EXE In a batch file. I want to launch this batch file from remote system on about 15 VMs. I have the desktop active on all the VMs and user under which these test cases need to be executed are also same as the user logged in. When I try to execute the batch file using the PSExec it throws an error and dosent launch the tests the error shown is as below

C:\TestRunningFolder>vstest.console.exe C:\BuildsFolder\BVTTests.orderedtest /Settings:C:\BuildsFolder\QuestCodedUI.testsettings /Logger:trx Microsoft (R) Test Execution Command Line Tool Version 12.0.30723.0 Copyright (c) Microsoft Corporation. All rights reserved. starting test execution, please wait... Warning: Warning: Test Run deployment issue: The assembly or module 'UiaComWrapp r' directly or indirectly referenced by the test container 'c:\BuildsFolder\questcodedui.dll' was not found.Error: Test host process exited unexpectedly. Error: Failed to queue test run 'testuser@RemoteMachine 2015-05-14 15:57:49': Unable to start the agent process.

Please let me know how can I execute the CodedUI tests on remote machine without using the TestAgent/Controller. Is it possible Via WMI ?. Anyone tried and succeeded please let me know.

Update : I was able to get past this issue by copying the required files in the folder. Now I am trying to launch the CodedUI tests using the PSExec.exe on remote system. I have remote desktop active and when I try to launch the batch file using the command line and it just gives me a message as shown below. PSEXEC.EXE \RemoteMachinename -i "c\users\testuser\desktop\Runtests.bat" when I do that it returns with error code 1 and tests are not started yet. I tried searching for solution I couldn't find anything that is usefull.

1
Do you have visual studio and all of the coded ui libraries installed on the remote machines? - Ryan Cox
Hi Ryan, Thanks for the response. I can get past that error now and I have updated the initial Question above. The version of PSExec I am using is 2.11. I have no success launching the tests on Remote system using the PSExec. - VPC
Is Visual Studio or the Visual Studio Agent at least installed on the system that needs to run the tests? - jessehouwing
Yes Visual studio is installed on each of the systems. Executing the same batch file works perfectly fine. - VPC

1 Answers

0
votes

For the above mentioned scenario, please copy all the dependency dll (eg : Microsoft.Visualstudio.Qualitytools.CodeduiTest etc.) to the folder where your build dll (projectname.dll) file is copied. Make sure that you are using correct version of vstest that supports the version of the VS you are using. For example, if your code is builded using VS 2015, you have to use vstest.console.exe that comes with Test Agent 2015/Test Agent 2013 Update 5. This trick worked for me. Please let me know whether this works for you. Regards.