Is it possible to run Coded UI tests without having to connect via remote desktop?

前端 未结 8 1141
陌清茗
陌清茗 2021-02-01 21:30

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.

8条回答
  •  灰色年华
    2021-02-01 22:22

    I ran into the same issue with our remote test machine, but our test machines run on Hyper-V. With Hyper-V, the solution is simply to connect via Hyper-V instead of Remote Desktop Connection, and closing the Hyper-V connection won't lock the computer.

    Another suggestion would be to get around the fact that Remote Desktop automatically locks your screen. There's a quick bit about that here: http://homeservershow.com/remote-desktop-session-locks-workstation-after-exit.html

    Basically, run "tscon.exe RDP-Tcp#0 /dest:console" in command prompt from the remote machine when you want to disconnect. The machine should remain unlocked and the tests will run just fine.

    According to @Zatricion, that command can be generalized:

    tscon.exe %sessionname% /dest:console
    

提交回复
热议问题