How do I run Coded UI test cases on remote systems?

Vivek Kulkarni's picture

I have Coded UI framework. Need to run the test cases on remote systems. Want to know how to do?

Using Visual Studio 2019 for development.

 

1 Answer

Steve Skok's picture

The Test Agent can run in either Service or Process mode. For the 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 the test controller doesn't 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 a specified user then 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 desktops open, and keeping it connected should do the trick.

StickyMinds is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.