Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
francois
slapos
Commits
a51d1da8
Commit
a51d1da8
authored
Oct 28, 2016
by
Douglas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jstestnode: adding support for remote desktop OSes
parent
92235fb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
software/jstestnode/runTestSuite.in
software/jstestnode/runTestSuite.in
+18
-3
software/jstestnode/software.cfg
software/jstestnode/software.cfg
+1
-1
No files found.
software/jstestnode/runTestSuite.in
View file @
a51d1da8
...
@@ -82,13 +82,20 @@ def main():
...
@@ -82,13 +82,20 @@ def main():
date = strftime("%Y/%m/%d %H:%M:%S", gmtime())
date = strftime("%Y/%m/%d %H:%M:%S", gmtime())
##########################
##########################
# Run all tests
# Run all tests
##########################
##########################
is_appium = False
if args.target == 'firefox':
if args.target == 'firefox':
firefox_binary = webdriver.firefox.firefox_binary.FirefoxBinary(firefox_path=FIREFOX_EXECUTABLE)
firefox_binary = webdriver.firefox.firefox_binary.FirefoxBinary(firefox_path=FIREFOX_EXECUTABLE)
browser = webdriver.Firefox(firefox_binary=firefox_binary)
browser = webdriver.Firefox(firefox_binary=firefox_binary)
else:
elif args.target in ['iOS', 'Android']:
# parameters for mobile emulators have different names then parameters for
# desktop OSes
is_appium = True
capabilities = {
capabilities = {
'platformName': args.target,
'platformName': args.target,
'platformVersion': args.target_version,
'platformVersion': args.target_version,
...
@@ -96,6 +103,16 @@ def main():
...
@@ -96,6 +103,16 @@ def main():
'browserName': args.target_browser
'browserName': args.target_browser
}
}
elif 'Windows' in args.target or 'OS X' in args.target:
# parameters for mobile emulators have different names then parameters for
# desktop OSes
is_appium = True
capabilities = {
'browserName': args.target_browser,
'platform': args.target,
'version': args.target_version
}
if is_appium:
if not args.appium_server_auth:
if not args.appium_server_auth:
raise RuntimeError('--appium_server_auth is required.')
raise RuntimeError('--appium_server_auth is required.')
appium_url = "http://%s@ondemand.saucelabs.com/wd/hub" % (args.appium_server_auth)
appium_url = "http://%s@ondemand.saucelabs.com/wd/hub" % (args.appium_server_auth)
...
@@ -118,8 +135,6 @@ def main():
...
@@ -118,8 +135,6 @@ def main():
body = etree.fromstring(browser.page_source.encode('UTF-8'), html_parser)
body = etree.fromstring(browser.page_source.encode('UTF-8'), html_parser)
browser.quit()
browser.quit()
browser.title.encode('UTF-8')
print ' '.join(body.xpath('//*[@id="qunit-testresult"]//text()'))
print ' '.join(body.xpath('//*[@id="qunit-testresult"]//text()'))
for elt in body.xpath('.//ol[@id="qunit-tests"]/li'):
for elt in body.xpath('.//ol[@id="qunit-tests"]/li'):
...
...
software/jstestnode/software.cfg
View file @
a51d1da8
...
@@ -107,7 +107,7 @@ mode = 0644
...
@@ -107,7 +107,7 @@ mode = 0644
[template-runTestSuite]
[template-runTestSuite]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/runTestSuite.in
url = ${:_profile_base_location_}/runTestSuite.in
md5sum =
da89bddca28899023b67eb9757cb94f4
md5sum =
67e619ee48f11292f44b9c3e5e7861ce
output = ${buildout:directory}/runTestSuite.in
output = ${buildout:directory}/runTestSuite.in
mode = 0644
mode = 0644
...
...
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