Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins on Windows and GUI Tests without RDC

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.

like image 724
Mike Borozdin Avatar asked Apr 16 '12 16:04

Mike Borozdin


1 Answers

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.

like image 61
Jason Swager Avatar answered Sep 30 '22 18:09

Jason Swager