Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
b3d4fb88
Commit
b3d4fb88
authored
Aug 30, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/seleniumrunner: add a selenium server service
Instead of what this software was supposed to be before
parent
21f1f1ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
30 deletions
+150
-30
software/seleniumrunner/buildout.hash.cfg
software/seleniumrunner/buildout.hash.cfg
+1
-1
software/seleniumrunner/instance-selenium.cfg.in
software/seleniumrunner/instance-selenium.cfg.in
+140
-26
software/seleniumrunner/software.cfg
software/seleniumrunner/software.cfg
+9
-3
No files found.
software/seleniumrunner/buildout.hash.cfg
View file @
b3d4fb88
...
...
@@ -19,4 +19,4 @@ md5sum = c4ac5de141ae6a64848309af03e51d88
[template-selenium]
filename = instance-selenium.cfg.in
md5sum =
9b6648b8f37baa3f7a6bfb68d4426049
md5sum =
038e124e96aff65a2ee1744db72755ab
software/seleniumrunner/instance-selenium.cfg.in
View file @
b3d4fb88
[buildout]
parts =
selenium-instance
promises
publish-connection-parameter
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[selenium-instance]
recipe = slapos.cookbook:seleniumrunner
runner-path = $${basedirectory:services}/selenium-runner
browser = $${firefox-instance:runner-path}
suite-url = $${slap-parameter:suite-url}
report-url = $${slap-parameter:report-url}
report-project = $${slap-parameter:report-project}
[firefox-instance]
recipe = slapos.cookbook:firefox
runner-path = $${rootdirectory:bin}/firefox-sandboxed
firefox-path = ${firefox-wrapper:location}
prefsjs-path = $${rootdirectory:etc}/prefs.js
shell-path = ${dash:location}/bin/dash
tmp-path = $${xvfb-instance:tmp-path}
[xvfb-instance]
recipe = slapos.cookbook:xvfb
runner-path = $${basedirectory:services}/xvfb
xvfb-path = ${xserver:location}/bin/Xvfb
fbdir-path = $${basedirectory:framebuffer}
tmp-path = $${basedirectory:run}
shell-path = ${dash:location}/bin/dash
recipe = slapos.cookbook:wrapper
wrapper-path = $${basedirectory:services}/$${:_buildout_section_name_}
command-line =
${xserver:location}/bin/Xvfb
$${:display}
-screen 0 1024x768x24
-fbdir $${basedirectory:framebuffer}
environment=
TMPDIR=$${basedirectory:tmp}
# We can safely use any $DISPLAY, because our slapos patched X11 isolate $DISPLAYs
# by placing sockets in $TMPDIR and using different $TMPDIR per partitions.
display = :0
[selenium-server-hub-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${basedirectory:services}/$${:_buildout_section_name_}
command-line =
${java-re-8:location}/bin/java
-jar ${selenium-server:target}
-host $${:hostname}
-port $${:port}
-role hub
-browserTimeout 120
-timeout 120
--debug
hostname = $${instance-parameter:ipv4-random}
port = 4444
url = http://$${:hostname}:$${:port}/wd/hub
register-url = http://$${:hostname}:$${:port}/grid/register/
# https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-the-nodes-by-command-line
[selenium-server-node-instance]
# Macro for a selenium server node
capabilities =
port =
java-args =
recipe = slapos.cookbook:wrapper
wrapper-path = $${basedirectory:services}/$${:_buildout_section_name_}
# TODO: option for maxSession ?
command-line =
${java-re-8:location}/bin/java $${:java-args}
-jar ${selenium-server:target}
-host $${:hostname}
-port $${:port}
-role node
-maxSession 100
-hub $${selenium-server-hub-instance:register-url}
-capabilities $${:capabilities}
--debug
# browsers and drivers are in buildout bin-directory, so we add it to $PATH
environment =
PATH=${buildout:bin-directory}
TMPDIR=$${basedirectory:tmp}
DISPLAY=$${xvfb-instance:display}
hostname = $${instance-parameter:ipv4-random}
[selenium-server-node-instance-firefox-51]
<= selenium-server-node-instance
capabilities = browserName=firefox,maxInstances=3,marionette=true,platform=LINUX,version=${firefox-51:version},firefox_binary=${firefox-wrapper-51:location}
java-args = -Dwebdriver.gecko.driver=${geckodriver-0.14.0:location}
port = 7777
[selenium-server-node-instance-firefox-52]
<= selenium-server-node-instance
capabilities = browserName=firefox,maxInstances=3,marionette=true,platform=LINUX,version=${firefox-52:version},firefox_binary=${firefox-wrapper-52:location}
java-args = -Dwebdriver.gecko.driver=${geckodriver-0.16.1:location}
port = 7778
[selenium-server-node-instance-firefox-60]
<= selenium-server-node-instance
capabilities = browserName=firefox,maxInstances=3,marionette=true,platform=LINUX,version=${firefox-60:version},firefox_binary=${firefox-wrapper-60:location}
java-args = -Dwebdriver.gecko.driver=${geckodriver-0.21.0:location}
port = 7779
xwd-path = ${xwd:location}/bin/xwd
xwd-hook-path = $${rootdirectory:bin}/xwd
[promises]
recipe =
# XXX only enable 51 & 52. They work only one time. We configure maxInstances=3 so practically
# this server can serve 6 session. Then it will loop forever, with the hub logging:
# 09:44:46.820 DEBUG [ProxySet.getNewSession] - Available nodes: [http://127.0.1.1:7777, http://127.0.1.1:7778]
# 09:44:46.821 DEBUG [BaseRemoteProxy.getNewSession] - Trying to create a new session on node http://127.0.1.1:7777
# 09:44:46.821 DEBUG [BaseRemoteProxy.getNewSession] - Node http://127.0.1.1:7777 has no matching capability
# 09:44:46.821 DEBUG [BaseRemoteProxy.getNewSession] - Trying to create a new session on node http://127.0.1.1:7778
# XXX 60 does not work at all.
instance-promises =
$${selenium-server-hub-listen-promise:path}
$${selenium-server-node-firefox-51-listen-promise:path}
$${selenium-server-node-firefox-52-listen-promise:path}
#XXX firefox-60 does not work at all
# $${selenium-server-node-firefox-60-listen-promise:path}
[check-port-listening-promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/$${:_buildout_section_name_}
[selenium-server-hub-listen-promise]
<= check-port-listening-promise
hostname= $${selenium-server-hub-instance:hostname}
port = $${selenium-server-hub-instance:port}
[selenium-server-node-firefox-51-listen-promise]
<= check-port-listening-promise
hostname= $${selenium-server-node-instance-firefox-51:hostname}
port = $${selenium-server-node-instance-firefox-51:port}
[selenium-server-node-firefox-52-listen-promise]
<= check-port-listening-promise
hostname= $${selenium-server-node-instance-firefox-52:hostname}
port = $${selenium-server-node-instance-firefox-52:port}
[selenium-server-node-firefox-60-listen-promise]
<= check-port-listening-promise
hostname= $${selenium-server-node-instance-firefox-60:hostname}
port = $${selenium-server-node-instance-firefox-60:port}
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = $${selenium-server-hub-instance:url}
[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]
recipe = slapos.cookbook:mkdirectory
...
...
@@ -42,6 +153,9 @@ bin = $${buildout:directory}/bin
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/
run
services = $${rootdirectory:etc}/
service
run = $${rootdirectory:var}/run
tmp = $${buildout:directory}/tmp
framebuffer = $${rootdirectory:srv}/framebuffer
promises = $${rootdirectory:etc}/promise
software/seleniumrunner/software.cfg
View file @
b3d4fb88
...
...
@@ -4,10 +4,10 @@ extends =
../../component/lxml-python/buildout.cfg
../../component/firefox/buildout.cfg
../../component/dash/buildout.cfg
../../component/java/buildout.cfg
../../stack/slapos.cfg
./buildout.hash.cfg
# develop += /opt/slapdev
parts =
slapos-cookbook
...
...
@@ -15,9 +15,9 @@ parts =
eggs
instance-recipe-egg
xserver
firefox
geckodriver
xwd
selenium-server
[instance-recipe]
egg = slapos.cookbook
...
...
@@ -32,6 +32,12 @@ recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
[selenium-server]
recipe = slapos.recipe.build:download
version = 3.14.0
md5sum = 376450bd517510442b60018646deadfe
filename = selenium-server-standalone-${:version}.jar
url = https://selenium-release.storage.googleapis.com/3.14/${:filename}
[macro-template]
recipe = slapos.recipe.template
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment