Testing using FEST Swing in CruiseControl

I have a CruiseControl CI build running as a windows service. Unfortunately when unit tests involving FEST Swing are run they fail as they need to actually render the UI components to a logged in user’s desktop.

My CruiseControl machines are virtual windows server 2003 machines running on vmware. So each build has its own dedicated virtual machine.

I followed the instructions for hudson builds on windows from the FEST Swing site.

Configure the server to auto login your build user:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon=1
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName=testuser
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword=secret

Start CruiseControl on login by creating a batch file in the users “Start Up” start menu folder containing:

"C:\Program Files\CruiseControl\Wrapper.exe" -c "C:\Program Files\CruiseControl\wrapper.conf"

Make sure that the screen saver is disabled.