Commit 28920e42 authored by Jérome Perrin's avatar Jérome Perrin

selenium server soft

parent 9e004dae
......@@ -19,4 +19,4 @@ md5sum = c4ac5de141ae6a64848309af03e51d88
[template-selenium]
filename = instance-selenium.cfg.in
md5sum = c48b4c1cf970e417f49a5b790f1b7bdc
md5sum = 76fdfc299c80ff5fb4450c35622af661
......@@ -48,8 +48,9 @@ command-line =
# maxSession: to accept enough clients
hostname = $${instance-parameter:ipv4-random}
port = 4444
url = http://$${:hostname}:$${:port}/wd/hub
register-url = http://$${:hostname}:$${:port}/grid/register/
base-url = http://$${:hostname}:$${:port}
url = $${:base-url}/wd/hub
register-url = $${:base-url}/grid/register/
[selenium-server-node-instance]
......@@ -66,7 +67,7 @@ command-line =
-host $${:hostname}
-port $${:port}
-role node
-timeout 20
-timeout 300
-hub $${selenium-server-hub-instance:register-url}
-capabilities $${:capabilities}
--debug
......@@ -98,35 +99,94 @@ capabilities = browserName=firefox,maxInstances=3,marionette=true,platform=LINUX
java-args = -Dwebdriver.gecko.driver=${geckodriver-0.21.0:location}
port = 7779
[selenium-server-node-instance-chromium-68]
[selenium-server-node-instance-chromium-69]
<= selenium-server-node-instance
capabilities = browserName=chrome,maxInstances=3,platform=LINUX,version=${chromium-68:version},chrome_binary=${chromium-wrapper-68:location}/chrome-slapos
capabilities = browserName=chrome,maxInstances=3,platform=LINUX,version=${chromium-69:version},chrome_binary=${chromium-wrapper-69:location}/chrome-slapos
java-args = -Dwebdriver.chrome.driver=${chromedriver-wrapper-2.41:location}
port = 7780
[selenium-server-register-password]
recipe = slapos.cookbook:generate.password
username = node
bytes = 12
[selenium-server-admin-password]
recipe = slapos.cookbook:generate.password
username = admin
bytes = 12
[selenium-server-selenium-password]
recipe = slapos.cookbook:generate.password
username = selenium
bytes = 12
[selenium-server-frontend-config]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:etc}/$${:_buildout_section_name_}
template = inline:
https://$${:hostname}:$${:port} {
bind $${:ip}
tls self_signed # XXX
proxy / $${selenium-server-hub-instance:base-url} {
transparent
}
basicauth $${selenium-server-admin-password:username} $${selenium-server-admin-password:passwd} {
realm "Grid Admin"
$${:path-admin}
}
basicauth $${selenium-server-register-password:username} $${selenium-server-register-password:passwd} {
realm "Register Selenium Node"
$${:path-register}
}
basicauth $${selenium-server-selenium-password:username} $${selenium-server-selenium-password:passwd} {
realm "Selenium Server"
$${:path-hub}
}
}
ip = $${instance-parameter:ipv6-random}
hostname = [$${:ip}]
port = 9443
path-admin = /grid/console
path-register = /grid/register/
path-hub = /wd/hub
[selenium-server-frontend-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line =
${caddy:output} -conf $${selenium-server-frontend-config:rendered}
hostname = $${selenium-server-frontend-config:hostname}
port = $${selenium-server-frontend-config:port}
admin-url = https://$${selenium-server-admin-password:username}:$${selenium-server-admin-password:passwd}@$${:hostname}:$${:port}$${selenium-server-frontend-config:path-admin}
register-url = https://$${selenium-server-register-password:username}:$${selenium-server-register-password:passwd}@$${:hostname}:$${:port}$${selenium-server-frontend-config:path-register}
url = https://$${selenium-server-selenium-password:username}:$${selenium-server-selenium-password:passwd}@$${:hostname}:$${:port}$${selenium-server-frontend-config:path-hub}
[promises]
recipe =
instance-promises =
$${selenium-server-frontend-listen-promise:path}
$${selenium-server-hub-listen-promise:path}
$${selenium-server-node-firefox-51-listen-promise:path}
$${selenium-server-node-firefox-52-listen-promise:path}
$${selenium-server-node-firefox-60-listen-promise:path}
$${selenium-server-node-instance-chromium-68-listen-promise:path}
# XXX firefox-60 does not work because of incompatibilities with our x11 TMPDIR patch.
# running firefox --marionette complains Gtk-WARNING **: cannot open display: :0
# running strace -f -s 100 TMPDIR=/same/tmpdir/as/xvfb/ firefox --marionette
# shows that some subprocesses are spawned with different TMPDIR.
##### connect(15, {sa_family=AF_UNIX, sun_path=@"/srv/slapgrid/slappart8/tmp/inst/TestRemoteDriver-0/tmp/Temp-0336e727-3485-4774-a816-75fda1baca12/.X11-unix"}, 113) = -1 EINVAL (Invalid argument)
##### write(2, "\n(/srv/slapgrid/slappart8/tmp/soft/c5be5b0096cd286c70df5156590cf4f6/parts/firefox-60/firefox:29812): Gtk-\33[1;33mWARNING\33[0m **: cannot open display: :0\n", 152) = 152
$${selenium-server-node-instance-chromium-69-listen-promise:path}
[check-port-listening-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/$${:_buildout_section_name_}
[selenium-server-frontend-listen-promise]
<= check-port-listening-promise
hostname= $${selenium-server-frontend-instance:hostname}
port = $${selenium-server-frontend-instance:port}
[selenium-server-hub-listen-promise]
<= check-port-listening-promise
hostname= $${selenium-server-hub-instance:hostname}
......@@ -147,15 +207,18 @@ port = $${selenium-server-node-instance-firefox-52:port}
hostname= $${selenium-server-node-instance-firefox-60:hostname}
port = $${selenium-server-node-instance-firefox-60:port}
[selenium-server-node-instance-chromium-68-listen-promise]
[selenium-server-node-instance-chromium-69-listen-promise]
<= check-port-listening-promise
hostname= $${selenium-server-node-instance-chromium-68:hostname}
port = $${selenium-server-node-instance-chromium-68:port}
hostname= $${selenium-server-node-instance-chromium-69:hostname}
port = $${selenium-server-node-instance-chromium-69:port}
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = $${selenium-server-hub-instance:url}
backend-url = $${selenium-server-hub-instance:url}
url = $${selenium-server-frontend-instance:url}
register-url = $${selenium-server-frontend-instance:register-url}
admin-url = $${selenium-server-frontend-instance:admin-url}
# to run a local node - useful to see what tests are doing or
# using to use unsupported browsers like safari or edge:
# ssh -L 4444:$${selenium-server-hub-instance:hostname}:$${selenium-server-hub-instance:port} selenium-server-hub-host -R $PORT:127.0.0.1:$PORT
......
......@@ -7,8 +7,10 @@ extends =
../../component/lxml-python/buildout.cfg
../../component/firefox/buildout.cfg
../../component/chromium/buildout.cfg
../../component/chromedriver/buildout.cfg
../../component/dash/buildout.cfg
../../component/java/buildout.cfg
../../component/caddy/buildout.cfg
../../stack/slapos.cfg
./buildout.hash.cfg
......
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