Running Coded UI test remotely

后端 未结 4 1784
天命终不由人
天命终不由人 2020-12-09 20:44

I have to run Coded UI test remotely on a VM. I am using Mstest.exe to execute the test cases. Now when i run it , through Windows scheduler , it fails because it need \"Act

4条回答
  •  旧巷少年郎
    2020-12-09 21:11

    Well there is no hard in setting up a test controler and a test agent, it is really easy and its the best way to go. You can find the installation guidelines here: http://msdn.microsoft.com/en-us/library/dd293551.aspx

    However, there are few issues that still exist even when you use a controller.

    The Test Agent can run in either Service or Process mode. For coded ui test you need to run it in a process mode (because it needs to be in the same windows session). But when you log into VM, with Remote Desktop, and close it, the Desktop of the target machine stays locked and tests cannot proceed. And unless you log in, there is no active session and test controler doesnt even get started.

    There are 2 ways to keep an active desktop that i know of:

    1. (recommended) Run AutoLogOn.exe from sysinternals suite (can be found at http://live.sysinternals.com/). It will automatically log in with specified user than the machine starts, and keep the desktop active.
    2. Keep a remote desktop in a non minimized window active. There are few applications that you can find that can keep multiple remote desktop's open, and keeping it connected should do the trick.

    Stas.

提交回复
热议问题