3

I am using Hudson CI to run an ant script which compiles and executes Selenium2/Webdriver tests (written as TestNG tests). These tests are set to run in a Firefox browser, not with headless HTMLUnit. During the Hudson build, I don't see any errors in the console output or the TestNG report, and my custom report seems to indicate that my tests do run normally, but I noticed that no actual Firefox browser is ever launched during the build.

In contrast, whenever I run my Selenium2/WebDriver tests via Eclipse or the command line either as a TestNG test or an Ant build, the tests always launch a browser on which I can see the tests being run. I just can't figure out why the browser does not appear. All of the aforementioned details suggest that the tests are in fact run properly, but the Hudson server is run on my local machine and no additional resources are apparently used to run the tests in their own Firefox instance.

I am not using Selenium Grid at the moment. Also, regardless if I run the tests sequentially or in parallel across multiple threads through Hudson, I am still not able to see any active browsers. I do vaguely remember at one point seeing Hudson launch an actual browser yesterday when I began this work, but I have yet to see once since. This makes me wonder if I possibly configured something incorrectly in my Hudson job.

Any help is greatly appreciated!

SlimDavid
  • 81
  • 1
  • 5
  • On what operating system are you running your tests? – A.J Jun 17 '11 at 15:29
  • I'm running it on Windows 7 Ultimate. Thanks! – SlimDavid Jun 17 '11 at 21:18
  • Found the issue. I was running Hudson as a service under the SYSTEM account (didn't know this existed), instead of my own account. The default Hudson install as a service installation apparently configures the service to run under this account. I went into the Services Manager and changed Hudson so that it would run under my account. – SlimDavid Jun 18 '11 at 00:14
  • Read up on having services interact with a desktop and discovered that it's not allowed. The only exception is with the SYSTEM account, where you can check a box to have the ability to see what it's doing. Going to do this for now. – SlimDavid Jun 18 '11 at 03:53

1 Answers1

5
  • Login to test node
  • Open the window services and locate Jenkins Slave services
  • Right click and select properties
  • Go to “Log On” tab
  • Make sure option “Local System Account” is selected and tick the option “Allow service to interact with desktop”
  • Click OK to save the setting
  • Restart the services.
cL83
  • 489
  • 5
  • 17