Commit 3bd67c58 authored by Jérome Perrin's avatar Jérome Perrin

software/seleniumrunner: Add a selenium server service

parent 1cfa4150
...@@ -19,4 +19,4 @@ md5sum = c4ac5de141ae6a64848309af03e51d88 ...@@ -19,4 +19,4 @@ md5sum = c4ac5de141ae6a64848309af03e51d88
[template-selenium] [template-selenium]
filename = instance-selenium.cfg.in filename = instance-selenium.cfg.in
md5sum = e30b1738099bf80c44d003ea57f709b4 md5sum = cf4a26cc898888999481e3ada51f8f97
[buildout] [buildout]
parts = parts =
selenium-instance promises
publish-connection-parameter
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
[selenium-instance]
recipe = slapos.cookbook:seleniumrunner [selenium-server-instance]
runner-path = $${basedirectory:services}/selenium-runner recipe = slapos.cookbook:wrapper
browser = $${firefox-instance:runner-path} wrapper-path = $${basedirectory:services}/$${:_buildout_section_name_}
suite-url = $${slap-parameter:suite-url} command-line =
report-url = $${slap-parameter:report-url} ${java-re-8:location}/bin/java
report-project = $${slap-parameter:report-project} -jar ${selenium-server:destination}
-host $${:hostname}
[firefox-instance] -port $${:port}
recipe = slapos.cookbook:firefox # browsers and driver are all in buildout bin-directory
runner-path = $${rootdirectory:bin}/firefox-sandboxed environment =
firefox-path = ${firefox:location} PATH=${buildout:bin-directory}
prefsjs-path = $${rootdirectory:etc}/prefs.js DISPLAY=$${xvfb-instance:display}
shell-path = ${dash:location}/bin/dash hostname = $${instance-parameter:ipv4-random}
tmp-path = $${xvfb-instance:tmp-path} port = 4444
url = http://$${:hostname}:$${:port}/wd/hub
[xvfb-instance] [xvfb-instance]
recipe = slapos.cookbook:xvfb recipe = slapos.cookbook:wrapper
runner-path = $${basedirectory:services}/xvfb wrapper-path = $${basedirectory:services}/$${:_buildout_section_name_}
xvfb-path = ${xserver:location}/bin/Xvfb command-line =
fbdir-path = $${basedirectory:framebuffer} ${xserver:location}/bin/Xvfb
tmp-path = $${basedirectory:run} -screen 0 1024x768x24
shell-path = ${dash:location}/bin/dash -fbdir $${basedirectory:framebuffer}
$${:display}
display = :123
[promises]
recipe =
instance-promises =
$${selenium-server-listen-promise:path}
[check-port-listening-promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/$${:_buildout_section_name_}
xwd-path = ${xwd:location}/bin/xwd [selenium-server-listen-promise]
xwd-hook-path = $${rootdirectory:bin}/xwd <= check-port-listening-promise
hostname= $${selenium-server-instance:hostname}
port = $${selenium-server-instance:port}
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = $${selenium-server-instance:url}
display = $${xvfb-instance:display}
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
[rootdirectory] [rootdirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -42,6 +72,8 @@ bin = $${buildout:directory}/bin ...@@ -42,6 +72,8 @@ bin = $${buildout:directory}/bin
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run run = $${rootdirectory:var}/run
framebuffer = $${rootdirectory:srv}/framebuffer framebuffer = $${rootdirectory:srv}/framebuffer
promises = $${rootdirectory:etc}/promise
...@@ -4,6 +4,7 @@ extends = ...@@ -4,6 +4,7 @@ extends =
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
../../component/firefox/buildout.cfg ../../component/firefox/buildout.cfg
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
../../component/java/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
./buildout.hash.cfg ./buildout.hash.cfg
...@@ -18,6 +19,7 @@ parts = ...@@ -18,6 +19,7 @@ parts =
firefox firefox
geckodriver geckodriver
xwd xwd
selenium-server
[instance-recipe] [instance-recipe]
egg = slapos.cookbook egg = slapos.cookbook
...@@ -32,6 +34,13 @@ recipe = zc.recipe.egg ...@@ -32,6 +34,13 @@ recipe = zc.recipe.egg
eggs = eggs =
${lxml-python:egg} ${lxml-python:egg}
[selenium-server]
recipe = slapos.recipe.build:download
version = 3.14.0
md5sum = 376450bd517510442b60018646deadfe
jar = selenium-server-standalone-${:version}.jar
url = https://selenium-release.storage.googleapis.com/3.14/${:jar}
destination = ${buildout:parts-directory}/${:_buildout_section_name_}/${:jar}
[macro-template] [macro-template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment