Running Selenium RC as a Windows Service.

271 views
Skip to first unread message

DazManCat

unread,
Nov 12, 2010, 11:33:27 AM11/12/10
to Selenium Users
Hi Guys,

I'm trying to setup Selenium RC as a Windows service so that I can
then integrate with Cruise Control.

Whilst it seems to have been setup correctly it does not appear to
work.

I have a simple test hub web app that fires off tests but when
running the service all I get is the page loading and "waiting
for ..." server messages.

When I stop the service it bombs out to an error message (as
expected) so it looks like it is running but does not seem to
respond.

Does anyone have any idea why it doesnt run properly?

My setup->

Following http://unintelligible.org/blog/2009/07/28/installing-selenium-rc-as-a-windows-service/

I have done the following:

Using the windows toolkit I have done:

"C:\Program Files\Windows Resource Kits\Tools\instsrv.exe"
SeleniumRC
"C:\Program Files\Windows Resource Kits\Tools\srvany.exe" -a
[SeleniumUser] -p [SeleniumUserPass]

Saved the following as a.reg file (and then double clicked it)

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SeleniumRC
\Parameters]
"Application"="java.exe"
"AppDirectory"="C:\\Program Files\\selenium-server-1.0.3"
"AppParameters"="-Xrs -jar selenium-server.jar"

My SeleniumUser has been granted log on as a service permission.

Started the service in Services MMC
Message has been deleted

Ross Patterson

unread,
Nov 12, 2010, 11:46:20 AM11/12/10
to seleniu...@googlegroups.com

We use the Java Service Launcher (http://jslwin.sourceforge.net/), and it works perfectly.  Here's our jsl.ini file, with a lot of comments stripped out.  Note that while we use the JAR file, we don't start it with "java -jar", because we're using log4j for RC logging.

[service]

appname = SeleniumRemoteControl

servicename = SeleniumRC

displayname = SeleniumRC

 

;account under which service runs

account=.\builder

password=...thepassword...

 

;Call <stopclass>.<stopmethod> through JNI so stop the JVM.

stopclass=java/lang/System

stopmethod=exit

stopsignature=(I)V

 

[java]

params = 4

param00 = -Dlog4j.configuration=file:///C:/selenium/selenium-server-1.0.1/jsl.log4j.properties

param01 = -cp

param02 = C:\selenium\selenium-server-1.0.1\log4j-1.2.16.jar;C:\selenium\selenium-server-1.0.1\selenium-server.jar;C:\selenium\selenium-server-1.0.1

param03 = org.openqa.selenium.server.SeleniumServer

 

Ross

DazManCat

unread,
Nov 12, 2010, 12:07:07 PM11/12/10
to Selenium Users
Hi Ross, I'll take a look at that URL.

Will that run Selenium as a windows service so, I dont have to keep
logging onto the server and running a batch script?
> Followinghttp://unintelligible.org/blog/2009/07/28/installing-selenium-rc-as-a...
>
>

Ross Patterson

unread,
Nov 12, 2010, 1:02:16 PM11/12/10
to seleniu...@googlegroups.com
Yes. We use this on our TeamCity build-grid machines, where RC only ever runs as a service (with auto-start at boot, of course).
Reply all
Reply to author
Forward
0 new messages