开发者

Running automated Web browser tests under Hudson

I'm running Hudson for my automated builds and love it.

I'd now like to create automated Web browser tests using either WaTiN (preferred) or Selenium.

As my Hudson runs as a Windows service (under Tomcat), how can I configure this to run? Will I be forced to log in as a user on the Hudson box so my automated browser tests will find a browser? Or is there some other sorcery with an interactive session that I can conjur开发者_StackOverflow中文版e up?

If possible I'd like the Hudson box itself to run the tests.


After some research I've found that WaTin won't work so well as I'd need to configure Hudson to run in an interactive Java session.

Selenium Grid, however, is perfect - there's a Hudson plug-in that can control it, too.

So that's what we'll use.


I'd now like to create automated Web browser tests ... my Hudson runs as a Windows service ... Will I be forced to log in as a user on the Hudson box so my automated browser tests will find a browser? Or is there some other sorcery with an interactive session that I can conjure up? If possible I'd like the Hudson box itself to run the tests.

A Windows service can indeed run a browser, even when logged in as the LocalSystem account. We have that exact setup, with Hudson installed as a Windows service, although deploying it to Tomcat and running that as a service should work equally well. We use Sahi for our automated testing, which runs our test suite in both IE and Firefox.

You didn't say what problem you had with Watin, but in case it's relevant, Sahi needs to set the browser's HTTP proxy to a special host and port. This works no problems with Firefox because Sahi configures its proxy via a profile specified on the Firefox command line. IE is a little tricker, because its proxy settings are in the Windows registry, and when running as the LocalSystem account, these come from a special place in the registry (not HKCU as for a logged-in user). See this SF answer for the details. If that was the problem you were having, you may yet be able to achieve your goal of running everything on the Hudson box.


Have you checked here? This shows the Selenium Grid plug-in to Hudson.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜