Forum Discussion

jimsmith_1's avatar
jimsmith_1
Contributor
12 years ago

Scheduling test run on a Virtual Machine

Does anyone know a way of running a scheduled TestComplete run on a virtual machine without having a Remote Desktop session connected at the time of the run?
  • To have a user still logged on and the TestExecute instance fooled into thinking that the VM is still outputting an image to a screen you need to send to console.



      Create a batch file on the desktop of the VM with this one line in it.



    tscon 2 /dest:console





      Then run that (double click on it). This should disconnect you from the VM and send the images to console. It leaves the user that is logged on still logged on. This makes TestExecute believe that the image is still on a screen. Therefore TestExecute won't give you the "The operation cannot be performed, because the user session is disconnected." error.



    Hope this helps.
  • It says..."In the Users tab, uncheck the box next to Users must enter a user name and password to use this computer."



    I don't have that checkbox.



    I will check with my sysadmin people to see what I need to do.
  • I tried that but it didn't disconnect me from the VM.



    If I run the command in the command console it says "Session ID 2 not found"



    I wonder what session ID I need?  Investigating...
  • I installed and downloaded Remote Desktop Services Manager on the VM and it showed me that my RDP session id is 4.



    So, I tried that in the batch file and my Remote Desktop session closed.



    My TestComplete run now runs happily without me being connected via remote Desktop. Thanks everyone.