views:

138

answers:

2

I have Hudson CI installed on a linux vm and a slave on windows 7 vm. I have a project running on the slave and it has some unit tests using the Project White Automated UI testing framework. All of those tests involve launching the application first in order to perform tasks like clicking on a button.

Problem

Hudson builds the project fine but when it gets to running the nunit tests with the UI tests it doesn't launch the application in order to perform those tests so all the the UI tests throw errors saying that the window im trying to use cannot be found because the application isn't being launched. All the regular unit tests run fine. How can I get hudson slave to launch the application so that i can run the UI tests?

+1  A: 

What user do you run your Hudson slave with? Does it run as a service using the local_system user? If yes, you won't have a chance.

Solution, change the user your Hudson slave service runs as to a 'real' user account. You also need to check the interact-with-desktop option. That should work than for you.

Peter Schuetze
How can I change the hudson slave service to run as a real user account?
MikeU
Go to service management in Windows (Control Panel->Administrative Tools->Services). There you need to find your Hudson Service and open the properties of the service. The second tab is "Log On". There you can enter a different account.
Peter Schuetze
If i add a user account I don't have the allow service to interact with desktop option anymore on Windows 7. If i enable that feature on the local system account it kind of works. The interactive services detection dialog box comes up and if i click on view message then all the test run but I don't want to keep having to click that view message button on the dialog screen in order to run the tests.
MikeU
Google said you need to disable the "Interactive Services Detection" service. Try your luck with it.
Peter Schuetze
+1  A: 

It seems that vnc and not using Hudson as a service are essential to make this work right. There are some good suggestions on the Project White CI Page. One that goes into a little bit of detail is here (It's for CruiseControl, but should work with Hudson).

Dan Woodward