robotframework-pabot 4.0.5__tar.gz → 4.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/PKG-INFO +1 -1
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/__init__.py +1 -1
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/result_merger.py +7 -2
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/robotframework_pabot.egg-info/PKG-INFO +1 -1
- robotframework_pabot-4.0.6/tests/test_resultmerger.py +126 -0
- robotframework_pabot-4.0.5/tests/test_resultmerger.py +0 -73
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/LICENSE.txt +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/MANIFEST.in +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/README.md +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/pyproject.toml +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/setup.cfg +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/setup.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/SharedLibrary.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/arguments.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/clientwrapper.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/coordinatorwrapper.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/execution_items.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/pabot.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/pabotlib.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/py3/__init__.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/py3/client.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/py3/coordinator.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/py3/messages.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/py3/worker.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/robotremoteserver.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/pabot/workerwrapper.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/robotframework_pabot.egg-info/SOURCES.txt +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/robotframework_pabot.egg-info/dependency_links.txt +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/robotframework_pabot.egg-info/entry_points.txt +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/robotframework_pabot.egg-info/requires.txt +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/src/robotframework_pabot.egg-info/top_level.txt +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_arguments_output.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_depends.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_functional.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_ordering.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_pabot.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_pabotlib.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_pabotsuitenames_io.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_prerunmodifier.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_stacktrace.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_testlevelsplit_include.py +0 -0
- {robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_testlevelsplit_output_task_order.py +0 -0
|
@@ -35,7 +35,7 @@ from robot.model import SuiteVisitor
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class ResultMerger(SuiteVisitor):
|
|
38
|
-
def __init__(self, result, tests_root_name, out_dir, copied_artifacts):
|
|
38
|
+
def __init__(self, result, tests_root_name, out_dir, copied_artifacts, legacy_output):
|
|
39
39
|
self.root = result.suite
|
|
40
40
|
self.errors = result.errors
|
|
41
41
|
self.current = None
|
|
@@ -43,6 +43,7 @@ class ResultMerger(SuiteVisitor):
|
|
|
43
43
|
self._tests_root_name = tests_root_name
|
|
44
44
|
self._prefix = ""
|
|
45
45
|
self._out_dir = out_dir
|
|
46
|
+
self.legacy_output = legacy_output
|
|
46
47
|
|
|
47
48
|
self._patterns = []
|
|
48
49
|
regexp_template = (
|
|
@@ -150,6 +151,8 @@ class ResultMerger(SuiteVisitor):
|
|
|
150
151
|
|
|
151
152
|
def merge_time(self, suite):
|
|
152
153
|
cur = self.current
|
|
154
|
+
if ROBOT_VERSION >= "7.0" and not self.legacy_output:
|
|
155
|
+
cur.elapsed_time = None
|
|
153
156
|
cur.endtime = max([cur.endtime, suite.endtime])
|
|
154
157
|
cur.starttime = min([cur.starttime, suite.starttime])
|
|
155
158
|
|
|
@@ -222,13 +225,14 @@ def merge_groups(
|
|
|
222
225
|
invalid_xml_callback,
|
|
223
226
|
out_dir,
|
|
224
227
|
copied_artifacts,
|
|
228
|
+
legacy_output
|
|
225
229
|
):
|
|
226
230
|
merged = []
|
|
227
231
|
for group in group_by_root(
|
|
228
232
|
results, critical_tags, non_critical_tags, invalid_xml_callback
|
|
229
233
|
).values():
|
|
230
234
|
base = group[0]
|
|
231
|
-
merger = ResultMerger(base, tests_root_name, out_dir, copied_artifacts)
|
|
235
|
+
merger = ResultMerger(base, tests_root_name, out_dir, copied_artifacts, legacy_output)
|
|
232
236
|
for out in group:
|
|
233
237
|
merger.merge(out)
|
|
234
238
|
merged.append(base)
|
|
@@ -259,6 +263,7 @@ def merge(
|
|
|
259
263
|
invalid_xml_callback,
|
|
260
264
|
settings.output_directory,
|
|
261
265
|
copied_artifacts,
|
|
266
|
+
rebot_options.get('legacyoutput')
|
|
262
267
|
)
|
|
263
268
|
if len(merged) == 1:
|
|
264
269
|
if not merged[0].suite.doc:
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
import os
|
|
3
|
+
import pabot.result_merger as result_merger
|
|
4
|
+
from robot.result.visitor import ResultVisitor
|
|
5
|
+
from robot import __version__ as ROBOT_VERSION
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ResultStats(ResultVisitor):
|
|
9
|
+
def __init__(self):
|
|
10
|
+
self.suites = []
|
|
11
|
+
self.tests = []
|
|
12
|
+
|
|
13
|
+
def end_test(self, test):
|
|
14
|
+
self.tests.append(test.longname)
|
|
15
|
+
|
|
16
|
+
def end_suite(self, suite):
|
|
17
|
+
self.suites.append(suite.longname)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ResultMergerTests(unittest.TestCase):
|
|
21
|
+
def test_test_level_run_merge(self):
|
|
22
|
+
result = result_merger.merge(
|
|
23
|
+
[
|
|
24
|
+
"tests/outputs/first.xml",
|
|
25
|
+
"tests/outputs/second.xml",
|
|
26
|
+
"tests/outputs/third.xml",
|
|
27
|
+
],
|
|
28
|
+
{},
|
|
29
|
+
"root",
|
|
30
|
+
[],
|
|
31
|
+
)
|
|
32
|
+
visitor = ResultStats()
|
|
33
|
+
result.visit(visitor)
|
|
34
|
+
self.assertEqual(["Tmp.Tests", "Tmp"], visitor.suites)
|
|
35
|
+
self.assertEqual(
|
|
36
|
+
["Tmp.Tests.First", "Tmp.Tests.Second", "Tmp.Tests.Third"], visitor.tests
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def test_suite_level_run_merge(self):
|
|
40
|
+
result = result_merger.merge(
|
|
41
|
+
["tests/outputs/tests.xml", "tests/outputs/tests2.xml"], {}, "root", []
|
|
42
|
+
)
|
|
43
|
+
visitor = ResultStats()
|
|
44
|
+
result.visit(visitor)
|
|
45
|
+
self.assertEqual(
|
|
46
|
+
[
|
|
47
|
+
"Tmp.Tests.First",
|
|
48
|
+
"Tmp.Tests.Second",
|
|
49
|
+
"Tmp.Tests.Third",
|
|
50
|
+
"Tmp.Tests2.First 2",
|
|
51
|
+
"Tmp.Tests2.Second 2",
|
|
52
|
+
"Tmp.Tests2.Third 2",
|
|
53
|
+
],
|
|
54
|
+
visitor.tests,
|
|
55
|
+
)
|
|
56
|
+
self.assertEqual(["Tmp.Tests", "Tmp.Tests2", "Tmp"], visitor.suites)
|
|
57
|
+
|
|
58
|
+
def test_prefixing(self):
|
|
59
|
+
self.assertEqual(
|
|
60
|
+
result_merger.prefix(os.path.join("foo", "bar", "zoo", "ba2r.xml")), "zoo"
|
|
61
|
+
)
|
|
62
|
+
self.assertEqual(
|
|
63
|
+
result_merger.prefix(os.path.join("/zoo", "baa", "floo.txt")), "baa"
|
|
64
|
+
)
|
|
65
|
+
self.assertEqual(result_merger.prefix(os.path.join("koo", "foo.bar")), "koo")
|
|
66
|
+
self.assertEqual(result_merger.prefix("hui.txt"), "")
|
|
67
|
+
|
|
68
|
+
def test_elapsed_time(self):
|
|
69
|
+
# output.xml generated based on robotframework >= 7.0 without --legacyoutput option
|
|
70
|
+
if ROBOT_VERSION >= "7.0":
|
|
71
|
+
result_1 = result_merger.merge(
|
|
72
|
+
[
|
|
73
|
+
"tests/outputs/output_with_latest_robot/first.xml",
|
|
74
|
+
"tests/outputs/output_with_latest_robot/second.xml",
|
|
75
|
+
"tests/outputs/output_with_latest_robot/third.xml",
|
|
76
|
+
],
|
|
77
|
+
{},
|
|
78
|
+
"root",
|
|
79
|
+
[],
|
|
80
|
+
)
|
|
81
|
+
visitor_1 = ResultStats()
|
|
82
|
+
result_1.visit(visitor_1)
|
|
83
|
+
self.assertEqual("Tmp", result_1.suite.name)
|
|
84
|
+
self.assertEqual(1573, result_1.suite.elapsedtime)
|
|
85
|
+
self.assertEqual("Tests", result_1.suite.suites[0].name)
|
|
86
|
+
self.assertEqual(1474, result_1.suite.suites[0].elapsedtime)
|
|
87
|
+
|
|
88
|
+
# output.xml generated based on robotframework >=7.0 with --legacyoutput option
|
|
89
|
+
result_2 = result_merger.merge(
|
|
90
|
+
[
|
|
91
|
+
"tests/outputs/first.xml",
|
|
92
|
+
"tests/outputs/second.xml",
|
|
93
|
+
"tests/outputs/third.xml",
|
|
94
|
+
],
|
|
95
|
+
{'legacyoutput': True},
|
|
96
|
+
"root",
|
|
97
|
+
[],
|
|
98
|
+
)
|
|
99
|
+
visitor_2 = ResultStats()
|
|
100
|
+
result_2.visit(visitor_2)
|
|
101
|
+
self.assertEqual("Tmp", result_2.suite.name)
|
|
102
|
+
self.assertEqual(1036, result_2.suite.elapsedtime)
|
|
103
|
+
self.assertEqual("Tests", result_2.suite.suites[0].name)
|
|
104
|
+
self.assertEqual(1010, result_2.suite.suites[0].elapsedtime)
|
|
105
|
+
else:
|
|
106
|
+
# output.xml generated based on robotframework < 7.0
|
|
107
|
+
result = result_merger.merge(
|
|
108
|
+
[
|
|
109
|
+
"tests/outputs/first.xml",
|
|
110
|
+
"tests/outputs/second.xml",
|
|
111
|
+
"tests/outputs/third.xml",
|
|
112
|
+
],
|
|
113
|
+
{},
|
|
114
|
+
"root",
|
|
115
|
+
[],
|
|
116
|
+
True
|
|
117
|
+
)
|
|
118
|
+
visitor = ResultStats()
|
|
119
|
+
result.visit(visitor)
|
|
120
|
+
self.assertEqual("Tmp", result.suite.name)
|
|
121
|
+
self.assertEqual(1036, result.suite.elapsedtime)
|
|
122
|
+
self.assertEqual("Tests", result.suite.suites[0].name)
|
|
123
|
+
self.assertEqual(1010, result.suite.suites[0].elapsedtime)
|
|
124
|
+
|
|
125
|
+
if __name__ == "__main__":
|
|
126
|
+
unittest.main()
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import unittest
|
|
2
|
-
import time
|
|
3
|
-
import os
|
|
4
|
-
import tempfile
|
|
5
|
-
import shutil
|
|
6
|
-
import random
|
|
7
|
-
import pabot.result_merger as result_merger
|
|
8
|
-
from robot.result.visitor import ResultVisitor
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class ResultStats(ResultVisitor):
|
|
12
|
-
def __init__(self):
|
|
13
|
-
self.suites = []
|
|
14
|
-
self.tests = []
|
|
15
|
-
|
|
16
|
-
def end_test(self, test):
|
|
17
|
-
self.tests.append(test.longname)
|
|
18
|
-
|
|
19
|
-
def end_suite(self, suite):
|
|
20
|
-
self.suites.append(suite.longname)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class ResultMergerTests(unittest.TestCase):
|
|
24
|
-
def test_test_level_run_merge(self):
|
|
25
|
-
result = result_merger.merge(
|
|
26
|
-
[
|
|
27
|
-
"tests/outputs/first.xml",
|
|
28
|
-
"tests/outputs/second.xml",
|
|
29
|
-
"tests/outputs/third.xml",
|
|
30
|
-
],
|
|
31
|
-
{},
|
|
32
|
-
"root",
|
|
33
|
-
[],
|
|
34
|
-
)
|
|
35
|
-
visitor = ResultStats()
|
|
36
|
-
result.visit(visitor)
|
|
37
|
-
self.assertEqual(["Tmp.Tests", "Tmp"], visitor.suites)
|
|
38
|
-
self.assertEqual(
|
|
39
|
-
["Tmp.Tests.First", "Tmp.Tests.Second", "Tmp.Tests.Third"], visitor.tests
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
def test_suite_level_run_merge(self):
|
|
43
|
-
result = result_merger.merge(
|
|
44
|
-
["tests/outputs/tests.xml", "tests/outputs/tests2.xml"], {}, "root", []
|
|
45
|
-
)
|
|
46
|
-
visitor = ResultStats()
|
|
47
|
-
result.visit(visitor)
|
|
48
|
-
self.assertEqual(
|
|
49
|
-
[
|
|
50
|
-
"Tmp.Tests.First",
|
|
51
|
-
"Tmp.Tests.Second",
|
|
52
|
-
"Tmp.Tests.Third",
|
|
53
|
-
"Tmp.Tests2.First 2",
|
|
54
|
-
"Tmp.Tests2.Second 2",
|
|
55
|
-
"Tmp.Tests2.Third 2",
|
|
56
|
-
],
|
|
57
|
-
visitor.tests,
|
|
58
|
-
)
|
|
59
|
-
self.assertEqual(["Tmp.Tests", "Tmp.Tests2", "Tmp"], visitor.suites)
|
|
60
|
-
|
|
61
|
-
def test_prefixing(self):
|
|
62
|
-
self.assertEqual(
|
|
63
|
-
result_merger.prefix(os.path.join("foo", "bar", "zoo", "ba2r.xml")), "zoo"
|
|
64
|
-
)
|
|
65
|
-
self.assertEqual(
|
|
66
|
-
result_merger.prefix(os.path.join("/zoo", "baa", "floo.txt")), "baa"
|
|
67
|
-
)
|
|
68
|
-
self.assertEqual(result_merger.prefix(os.path.join("koo", "foo.bar")), "koo")
|
|
69
|
-
self.assertEqual(result_merger.prefix("hui.txt"), "")
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if __name__ == "__main__":
|
|
73
|
-
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotframework_pabot-4.0.5 → robotframework_pabot-4.0.6}/tests/test_testlevelsplit_include.py
RENAMED
|
File without changes
|
|
File without changes
|