I\'m attempting to automate Coded UI tests.
My test controller launches the tests on a remote test server, which I normally access via a Remote Desktop connection.
--Preferred Solution 1: Have a Hyper-V Client and simply run coded UI tests using a schedule task. No issues at all.
--preferred Solution 2: You need to have 2 VM. First remote desktop to VM 1, then from VM 1 remote desktop to VM 2 where Coded UI will be running. Once Coded UI started in VM2, simply disconnect VM 1. This will keep the session opened and will never have any issues
-less preferred Solution 3: Restart VM using command line. Make sue auto-log in is enabled on your VM. Have a scheduled task to run coded UI.
I used this method and found some of my tests breaks.
--least preferred Solution 4: use tscon.exe %sessionname% /dest:console I used this method but cannot guarantee that your test will run with out any issues