0

I'm trying 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.

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

Currently, the tests only run when I have connected via Remote Desktop, and the window must be open. When I close the Remote Desktop session, the tests do not run.

If it isn't possible to run coded UI tests without remote desktop, how can I automate connecting via remote desktop?

Thanks

raj
  • 1
  • 1

2 Answers2

0

As to your first question, the test agent needs to be "online" for tests to run. and the test agent is "online" only when the environment is in "ready" state. You cannot run a test in an environment(remote connection/local machine) without it being in "Ready" state.

With regards to your second question about automating a desktop connection, this link, however seems to be helpful: Automating remote desktop connection

Community
  • 1
  • 1
Anu7
  • 77
  • 1
  • 17
0

Coded UI tests are independent of Remote Desktop.

All UI tests are dependent on UI though. This means, the user must be logged in, and the screen cannot be locked.

Usually, when you disconnect from an RDP session, the screen gets locked. Also, you would have to set the user to auto-login in order for tests to be run. (RDP connections will also log you in.)

So, if you are able (allowed) to, easiest is:

  1. Set user to auto-login.
  2. Use VNC software for connection, like UltraVNC. You do not have the problem of the screen locking on disconnect.

You can automatically initiate RDP connection. I used it, and it is a bad idea, because it is fragile, and if it breaks, it will fail your tests (e. g. when you have it linked to a build job and it should run all the time).

Andreas Reiff
  • 7,961
  • 10
  • 50
  • 104