Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Eteri
erp5
Commits
63ec1fef
Commit
63ec1fef
authored
Aug 16, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code style, comments and spell fixes.
Several changes which only improve code readability only.
parent
77875a6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+15
-20
No files found.
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
View file @
63ec1fef
...
...
@@ -48,6 +48,8 @@ TEST_RESULT_RE = re.compile('<div style="padding-top: 10px;">\s*<p>\s*'
TEST_ERROR_RESULT_RE = re.compile('
.
*
(
?
:
error
.
gif
|
title
status_failed
).
*
', re.S)
ZELENIUM_BASE_URL = "%s/portal_tests/%s/core/TestRunner.html?test=../test_suite_html&auto=on&resultsUrl=%s/portal_tests/postResults&__ac_name=%s&__ac_password=%s"
tests_framework_home = os.path.dirname(os.path.abspath(__file__))
# handle '
system
global
' instance
if tests_framework_home.startswith('
/
usr
/
lib
'):
...
...
@@ -125,8 +127,8 @@ class Firefox:
print '
firefox
:
%
d
' % self.pid
return self.pid
def getPrefJs(self
, host, port
):
prefs_js =
"""
def getPrefJs(self):
return
"""
// Don'
t
ask
if
we
want
to
switch
default
browsers
user_pref
(
"browser.shell.checkDefaultBrowser"
,
false
);
...
...
@@ -158,10 +160,8 @@ user_pref("dom.max_script_run_time", 120);
//
this
is
required
to
upload
files
user_pref
(
"capability.principal.codebase.p1.granted"
,
"UniversalFileRead"
);
user_pref
(
"signed.applets.codebase_principal_support"
,
true
);
user_pref
(
"capability.principal.codebase.p1.id"
,
"http://%s"
);
user_pref
(
"capability.principal.codebase.p1.id"
,
"http://%s
:%s
"
);
user_pref
(
"capability.principal.codebase.p1.subjectName"
,
""
);
""" %
\
'%s:%s' % (host, port)
return prefs_js
def _prepare(self):
prefs_js = self.getPrefJs(self.host, self.port)
...
...
@@ -177,7 +177,6 @@ user_pref("capability.principal.codebase.p1.subjectName", "");""" % \
class FunctionalTestRunner:
ZELENIUM_BASE_URL = "%s/portal_tests/core/TestRunner.html?test=../test_suite_html&auto=on&resultsUrl=%s/portal_tests/postResults&__ac_name=%s&__ac_password=%s"
def __init__(self, host, port, portal, run_only=''):
...
...
@@ -198,15 +197,9 @@ class FunctionalTestRunner:
transaction.commit()
return self.portal.portal_tests.TestTool_getResults()
def _getTestURL(self, run_only):
url_string = self.ZELENIUM_BASE_URL % (self.portal_url,
self.portal_url,
self.user,
self.password)
if run_only:
url_string = url_string.replace('/portal_tests/',
'/portal_tests/%s/' % self.run_only, 1)
return url_string
def _getTestURL(self):
return ZELENIUM_BASE_URL % (self.portal.portal_url(), self.run_only,
self.portal.portal_url(), self.user, self.password)
def launchFunctionalTest(self, debug=0):
pid = None
...
...
@@ -276,6 +269,8 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
conversion_server_hostname=conversion_dict['hostname'],
conversion_server_port=conversion_dict['port']
)
# XXX Memcached is missing
# XXX Persistent cache setup is missing
def testFunctionalTestRunner(self):
# first of all, abort to get rid of the mysql participation inn this
...
...
@@ -285,13 +280,13 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
self.portal, self.run_only)
self.runner.launchFunctionalTest(debug=self.foreground)
detail, sucess, failure, error_title_list = self.runner.processResult()
detail, suc
c
ess, failure, error_title_list = self.runner.processResult()
self.logMessage("-"
*
79)
total = sucess + failure
self.logMessage("-"
*
79)
total = suc
c
ess + failure
self.logMessage("%s Functional Tests %s Tests, %s Failures" %
\
(self.getTitle(), total, failure))
self.logMessage("-"
*
79)
self.logMessage("-"
*
79)
self.logMessage(detail)
self.logMessage("-"
*
79)
self.logMessage("-"
*
79)
self.assertEquals([], error_title_list)
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