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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
erp5
Commits
038ac81c
Commit
038ac81c
authored
Aug 21, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Improve display of failed Zelenium tests
See merge request
nexedi/erp5!1796
parents
30405447
d1fb21fe
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
343 deletions
+16
-343
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResultLine_view.xml
...tem/portal_skins/erp5_test_result/TestResultLine_view.xml
+0
-1
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResultLine_view/your_hide_expected_failure.xml
...result/TestResultLine_view/your_hide_expected_failure.xml
+0
-331
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+16
-11
No files found.
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResultLine_view.xml
View file @
038ac81c
...
@@ -96,7 +96,6 @@
...
@@ -96,7 +96,6 @@
<string>
my_duration
</string>
<string>
my_duration
</string>
<string>
my_parent_int_index
</string>
<string>
my_parent_int_index
</string>
<string>
my_source_title
</string>
<string>
my_source_title
</string>
<string>
your_hide_expected_failure
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResultLine_view/your_hide_expected_failure.xml
deleted
100644 → 0
View file @
30405447
This diff is collapsed.
Click to expand it.
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
View file @
038ac81c
...
@@ -44,7 +44,7 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
...
@@ -44,7 +44,7 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from
Products.ERP5Type.tests.runUnitTest
import
log_directory
from
Products.ERP5Type.tests.runUnitTest
import
log_directory
from
Products.ERP5Type.Utils
import
stopProcess
,
PR_SET_PDEATHSIG
from
Products.ERP5Type.Utils
import
stopProcess
,
PR_SET_PDEATHSIG
from
lxml
import
etree
from
lxml
import
etree
from
lxml.html
import
builder
as
E
from
lxml.html
.builder
import
E
import
certifi
import
certifi
import
urllib3
import
urllib3
from
selenium
import
webdriver
from
selenium
import
webdriver
...
@@ -360,7 +360,7 @@ class FunctionalTestRunner:
...
@@ -360,7 +360,7 @@ class FunctionalTestRunner:
iframe
=
etree
.
fromstring
(
iframe
=
etree
.
fromstring
(
browser
.
execute_script
(
browser
.
execute_script
(
"return document.getElementById('testSuiteFrame').contentDocument.querySelector('html').innerHTML"
"return document.getElementById('testSuiteFrame').contentDocument.querySelector('html').innerHTML"
)
.
encode
(
'UTF-8'
)
,
),
html_parser
html_parser
)
)
return
iframe
return
iframe
...
@@ -383,26 +383,31 @@ class FunctionalTestRunner:
...
@@ -383,26 +383,31 @@ class FunctionalTestRunner:
test_table
=
tr
[
1
].
xpath
(
'.//table'
)[
0
]
test_table
=
tr
[
1
].
xpath
(
'.//table'
)[
0
]
status
=
tr
.
attrib
.
get
(
'class'
)
status
=
tr
.
attrib
.
get
(
'class'
)
if
'status_failed'
in
status
:
if
'status_failed'
in
status
:
# XXX replace status_failed classes by an inline style supported by gadget_html_viewer
for
test_tr
in
test_table
.
xpath
(
'.//tr[contains(@class, "status_failed")]'
):
test_tr
.
set
(
'style'
,
'background-color: red;'
)
details_attribute_dict
=
{}
if
etree
.
tostring
(
test_table
).
find
(
"expected failure"
)
!=
-
1
:
if
etree
.
tostring
(
test_table
).
find
(
"expected failure"
)
!=
-
1
:
expected_failure_amount
+=
1
expected_failure_amount
+=
1
else
:
else
:
failure_amount
+=
1
failure_amount
+=
1
error_title_list
.
append
(
test_name
)
error_title_list
.
append
(
test_name
)
detail_element
=
E
.
DIV
()
details_attribute_dict
[
'open'
]
=
'true'
detail_element
.
append
(
E
.
DIV
(
E
.
P
(
test_name
),
E
.
BR
,
test_table
))
detail_element
=
E
.
div
()
detail_element
.
append
(
E
.
details
(
E
.
summary
(
test_name
),
test_table
,
**
details_attribute_dict
))
detail
+=
etree
.
tostring
(
detail_element
)
detail
+=
etree
.
tostring
(
detail_element
)
tr_count
+=
1
tr_count
+=
1
sucess_amount
=
tr_count
-
1
-
failure_amount
-
expected_failure_amount
suc
c
ess_amount
=
tr_count
-
1
-
failure_amount
-
expected_failure_amount
if
detail
:
if
detail
:
detail
=
'''<html>
detail
=
'''<html>
<
head
>
<
body
>
<style type="text/css">tr.status_failed { background-color:red };</style
>
<h3>Failed Zelenium Test Details</h3
>
</head>
%s
<
body>%s<
/body>
</body>
</html>'''
%
detail
</html>'''
%
detail
# When return fix output for handle unicode issues.
# When return fix output for handle unicode issues.
return
detail
,
sucess_amount
,
failure_amount
,
expected_failure_amount
,
\
return
detail
,
suc
c
ess_amount
,
failure_amount
,
expected_failure_amount
,
\
error_title_list
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