Jenkins on Windows and GUI Tests without RDC

Mike Borozdin picture Mike Borozdin · Apr 16, 2012 · Viewed 26.8k times · Source

We have a master-slave configuration for Jenkins. Our .NET project is built by a slave Jenkins instance running on Windows.

There are a bunch of GUI tests, however they only seem to run if there's a remote desktop connection (RDC) session open.

When trying to run the tests with no RDC, Jenkins doesn't show any progress in testing. Then, however, I connect to the Slave's desktop and can see the main window of the application launched, however the UI testing framework (White) cannot perform any actions.

The Jenkins slave is launched via Java Web Start.

I read on several websites that unfortunately it is not possible to run GUI tests without RDC session.

I just want to confirm that it is true and wonder if there is any workaround.

Answer

Jason Swager picture Jason Swager · Apr 16, 2012

Your slave machines have to be at a desktop before the test can run properly. We had the same problem.

Solution was to have the test machine start up and auto-logon to the desktop. To ensure that the test would ONLY start after the desktop was available, we added a scheduled task, set to run at user login, that would launch the Jenkins slave via Java Web Start. That way, Jenkins would only see the slave once the desktop was running. After that, everything worked fine.