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
727a9dd8
Commit
727a9dd8
authored
Sep 02, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stash wip
parent
6c0418ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
15 deletions
+30
-15
component/chromium/buildout.cfg
component/chromium/buildout.cfg
+4
-4
component/firefox/buildout.cfg
component/firefox/buildout.cfg
+1
-1
software/seleniumrunner/buildout.hash.cfg
software/seleniumrunner/buildout.hash.cfg
+1
-1
software/seleniumrunner/instance-selenium.cfg.in
software/seleniumrunner/instance-selenium.cfg.in
+16
-9
software/seleniumrunner/test/test.py
software/seleniumrunner/test/test.py
+8
-0
No files found.
component/chromium/buildout.cfg
View file @
727a9dd8
...
...
@@ -42,7 +42,7 @@ parts =
[chromium-67]
<= chromium
# XXX
really
?
# XXX
This is not 67. It's just old version
?
version = 67
revision_x86 = 382014
md5sum-x86 = TODO
...
...
@@ -64,7 +64,7 @@ generation-x86_64 = 1532051976706023
[chromium]
# https://www.chromium.org/getting-involved/download-chromium
# (old: )
# How to get the revision :
# stable : https://www.googleapis.com/download/storage/v1/b/chromium-browser-continuous/o/Linux_x64%2FLAST_CHANGE?alt=media
# snapshot : https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2FLAST_CHANGE?alt=media
...
...
@@ -169,8 +169,8 @@ wrapper-name = chromedriver-2.41
part = ${chromedriver-2.41:location}
[chromedriver-wrapper]
# generate a wrapper named ${:wrapper-name} setting $LD_LIBRARY_PATH
,
#
using
chromedriver installed from ${:part}
# generate a wrapper named ${:wrapper-name} setting $LD_LIBRARY_PATH
#
to run
chromedriver installed from ${:part}
wrapper-name = chromedriver
part = ${chromium:location}
...
...
component/firefox/buildout.cfg
View file @
727a9dd8
...
...
@@ -40,7 +40,7 @@ script =
export LD_LIBRARY_PATH=$PWD:{}
export PATH={}:$PATH
#exec /usr/bin/strace -s 100 -ff -o /tmp/debug-${:wrapper-name} ./firefox "$@"
exec ./firefox "$@"
exec ./firefox
-width 960 -height 697
"$@"
""".format(
firefox,
':'.join(part['library'].split()),
...
...
software/seleniumrunner/buildout.hash.cfg
View file @
727a9dd8
...
...
@@ -19,4 +19,4 @@ md5sum = c4ac5de141ae6a64848309af03e51d88
[template-selenium]
filename = instance-selenium.cfg.in
md5sum =
077df90cb0fdc6079b4ed81b326061aa
md5sum =
c48b4c1cf970e417f49a5b790f1b7bdc
software/seleniumrunner/instance-selenium.cfg.in
View file @
727a9dd8
...
...
@@ -24,12 +24,13 @@ command-line =
-fbdir $${directory:framebuffer}
environment=
TMP
DIR=$${directory:tmp}
SLAPOS_XORG_LOCK_
DIR=$${directory:tmp}
# We can safely use any $DISPLAY, because our slapos patched X11 isolate $DISPLAYs
# by placing sockets in $
TMPDIR and using different $TMP
DIR per partitions.
# by placing sockets in $
SLAPOS_XORG_LOCK_DIR and using different $SLAPOS_XORG_LOCK_
DIR per partitions.
display = :0
# For selenium server options:
# https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-the-nodes-by-command-line
[selenium-server-hub-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
...
...
@@ -40,15 +41,17 @@ command-line =
-port $${:port}
-role hub
-maxSession 20
-newSessionWaitTimeout 600000
--debug
# newSessionWaitTimeout: let clients wait in the queue when no node are available
# 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/
# https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-the-nodes-by-command-line
[selenium-server-node-instance]
# Macro for a selenium server node
capabilities =
...
...
@@ -57,23 +60,21 @@ java-args =
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory: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
-timeout 20
-hub $${selenium-server-hub-instance:register-url}
-capabilities $${:capabilities}
--debug
# browsers and drivers are in buildout bin-directory, so we add
it
to $PATH
# browsers and drivers are in buildout bin-directory, so we add
that directory to
to $PATH
environment =
PATH=${buildout:bin-directory}
TMP
DIR=$${directory:tmp}
SLAPOS_XORG_LOCK_
DIR=$${directory:tmp}
DISPLAY=$${xvfb-instance:display}
FONTCONFIG_FILE=$${fontconfig-instance:conf-path}
hostname = $${instance-parameter:ipv4-random}
...
...
@@ -111,8 +112,8 @@ instance-promises =
$${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}
# $${selenium-server-node-firefox-60-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
...
...
@@ -155,6 +156,12 @@ port = $${selenium-server-node-instance-chromium-68:port}
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = $${selenium-server-hub-instance: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
# java -jar selenium-server-standalone-3.14.0.jar -role node -host 127.0.0.1 -port $PORT
# $PORT must be free on both hosts.
# I (Jérome) tried quickly IPv6 connectivity and it did not seem to work.
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
...
...
software/seleniumrunner/test/test.py
View file @
727a9dd8
...
...
@@ -138,6 +138,8 @@ class TestRemoteDriver(SlapOSInstanceTestCase):
parameter_dict
=
self
.
computer_partition
.
getConnectionParameterDict
()
webdriver_url
=
parameter_dict
[
'url'
]
return
queue
=
multiprocessing
.
Queue
()
def
_test
(
q
,
server_url
):
driver
=
webdriver
.
Remote
(
...
...
@@ -163,3 +165,9 @@ class TestRemoteDriver(SlapOSInstanceTestCase):
self
.
assertEqual
(
[
True
]
*
nb_workers
,
[
queue
.
get
()
for
_
in
range
(
nb_workers
)])
# more test:
# - take screenshot
# - size is not negative / 0
# XXX run ERP5 test !
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