robotframework-logxml2chunks 1.1.4__tar.gz → 1.1.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_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/LogXML2Chunks/LogXML2Chunks.py +28 -18
- {robotframework_logxml2chunks-1.1.4/robotframework_logxml2chunks.egg-info → robotframework_logxml2chunks-1.1.6}/PKG-INFO +1 -1
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6/robotframework_logxml2chunks.egg-info}/PKG-INFO +1 -1
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/setup.py +1 -1
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/LICENSE +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/LogXML2Chunks/__init__.py +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/LogXML2Chunks/cli.py +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/README.md +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/robotframework_logxml2chunks.egg-info/SOURCES.txt +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/robotframework_logxml2chunks.egg-info/dependency_links.txt +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/robotframework_logxml2chunks.egg-info/entry_points.txt +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/robotframework_logxml2chunks.egg-info/not-zip-safe +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/robotframework_logxml2chunks.egg-info/requires.txt +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/robotframework_logxml2chunks.egg-info/top_level.txt +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/setup.cfg +0 -0
- {robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/tests/test_logxml2chunks.py +0 -0
|
@@ -266,7 +266,11 @@ class LogXML2Chunks:
|
|
|
266
266
|
idx_match = re.match(r'^(\d+)_', filename)
|
|
267
267
|
idx = int(idx_match.group(1)) if idx_match else 0
|
|
268
268
|
|
|
269
|
-
# Check if corresponding log file exists
|
|
269
|
+
# Check if corresponding log file exists.
|
|
270
|
+
# Both XML and HTML use the same double-underscore convention:
|
|
271
|
+
# 1_GUI_TBD__Update_Role_..._t1.xml
|
|
272
|
+
# 1_GUI_TBD__Update_Role_..._t1_log.html
|
|
273
|
+
# so the log filename is simply stem + '_log.html'.
|
|
270
274
|
log_filepath = None
|
|
271
275
|
xml_path = Path(xml_filepath)
|
|
272
276
|
log_filename = xml_path.stem + '_log.html'
|
|
@@ -278,6 +282,9 @@ class LogXML2Chunks:
|
|
|
278
282
|
checksum_data = f"{test_name}{test_doc}".encode('utf-8')
|
|
279
283
|
checksum = hashlib.md5(checksum_data).hexdigest()
|
|
280
284
|
|
|
285
|
+
elements_path = filename.split('__')
|
|
286
|
+
full_prefix = '_'.join(elements_path[0].split('_')[1:]) if len(elements_path) > 1 else None
|
|
287
|
+
|
|
281
288
|
# Build result dictionary
|
|
282
289
|
result = {
|
|
283
290
|
'index': idx,
|
|
@@ -290,8 +297,9 @@ class LogXML2Chunks:
|
|
|
290
297
|
'source': test_source,
|
|
291
298
|
'xml_file': str(xml_filepath),
|
|
292
299
|
'checksum': checksum,
|
|
293
|
-
'success': True
|
|
294
|
-
|
|
300
|
+
'success': True,
|
|
301
|
+
'full_prefix': full_prefix
|
|
302
|
+
}
|
|
295
303
|
|
|
296
304
|
# Add log file if it exists
|
|
297
305
|
if log_filepath:
|
|
@@ -450,28 +458,27 @@ class LogXML2Chunks:
|
|
|
450
458
|
for idx, (suite, test) in enumerate(test_cases, 1):
|
|
451
459
|
test_name = test.get('name')
|
|
452
460
|
test_id = test.get('id')
|
|
461
|
+
|
|
462
|
+
# Create a safe filename (with prefix if available)
|
|
463
|
+
safe_name = test_name.replace(' ', '_').replace('/', '_').replace('\\', '_')
|
|
453
464
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
465
|
+
if self.filename_prefix_pattern and self.filename_prefix_static:
|
|
466
|
+
prefix = f"{self._extract_filename_prefix(test, suite, root)}_{self.filename_prefix_static}"
|
|
467
|
+
elif self.filename_prefix_static:
|
|
468
|
+
prefix = self.filename_prefix_static
|
|
457
469
|
elif self.filename_prefix_pattern:
|
|
458
|
-
# Extract filename prefix (if pattern is configured)
|
|
459
470
|
prefix = self._extract_filename_prefix(test, suite, root)
|
|
460
471
|
else:
|
|
461
472
|
prefix = None
|
|
462
473
|
|
|
463
|
-
# Create a safe filename (with prefix if available)
|
|
464
|
-
safe_name = test_name.replace(' ', '_').replace('/', '_').replace('\\', '_')
|
|
465
|
-
if prefix:
|
|
466
|
-
xml_filename = f"{idx}_{prefix}_{safe_name}_{test_id}.xml"
|
|
467
|
-
else:
|
|
468
|
-
xml_filename = f"{idx}_{safe_name}_{test_id}.xml"
|
|
469
|
-
xml_filepath = output_path / xml_filename
|
|
470
|
-
|
|
471
474
|
if prefix:
|
|
472
475
|
self._debug_print(f"\n[{idx}/{len(test_cases)}] Processing: {test_name} (Prefix: {prefix})")
|
|
476
|
+
xml_filename = f"{idx}_{prefix}__{safe_name}_{test_id}.xml"
|
|
473
477
|
else:
|
|
474
478
|
self._debug_print(f"\n[{idx}/{len(test_cases)}] Processing: {test_name}")
|
|
479
|
+
xml_filename = f"{idx}__{safe_name}_{test_id}.xml"
|
|
480
|
+
|
|
481
|
+
xml_filepath = output_path / xml_filename
|
|
475
482
|
|
|
476
483
|
# Create a new XML document with only this test case
|
|
477
484
|
new_root = ET.Element('robot', root.attrib)
|
|
@@ -546,11 +553,14 @@ class LogXML2Chunks:
|
|
|
546
553
|
|
|
547
554
|
self._debug_print(f" ✓ Created XML: {xml_filepath}")
|
|
548
555
|
|
|
549
|
-
# Generate HTML report using rebot
|
|
556
|
+
# Generate HTML report using rebot.
|
|
557
|
+
# Use the same double-underscore separator as the XML filename so that
|
|
558
|
+
# get_data_from_chunk() can reliably locate the log by replacing '__' → '_'
|
|
559
|
+
# in the XML stem and appending '_log.html'.
|
|
550
560
|
if prefix:
|
|
551
|
-
log_filename = f"{idx}_{prefix}
|
|
561
|
+
log_filename = f"{idx}_{prefix}__{safe_name}_{test_id}_log.html"
|
|
552
562
|
else:
|
|
553
|
-
log_filename = f"{idx}
|
|
563
|
+
log_filename = f"{idx}__{safe_name}_{test_id}_log.html"
|
|
554
564
|
log_filepath = output_path / log_filename
|
|
555
565
|
|
|
556
566
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: robotframework-logxml2chunks
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.6
|
|
4
4
|
Summary: Extract individual test cases from Robot Framework output.xml into separate chunks
|
|
5
5
|
Home-page: https://github.com/ajadach/robotframework-LogXML2Chunks
|
|
6
6
|
Author: Artur Jadach
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: robotframework-logxml2chunks
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.6
|
|
4
4
|
Summary: Extract individual test cases from Robot Framework output.xml into separate chunks
|
|
5
5
|
Home-page: https://github.com/ajadach/robotframework-LogXML2Chunks
|
|
6
6
|
Author: Artur Jadach
|
|
@@ -10,7 +10,7 @@ long_description = (this_directory / "README.md").read_text(encoding='utf-8')
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name='robotframework-logxml2chunks',
|
|
13
|
-
version='1.1.
|
|
13
|
+
version='1.1.6',
|
|
14
14
|
author='Artur Jadach',
|
|
15
15
|
author_email='artur.k.ziolkowski@example.com',
|
|
16
16
|
description='Extract individual test cases from Robot Framework output.xml into separate chunks',
|
|
File without changes
|
{robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/LogXML2Chunks/__init__.py
RENAMED
|
File without changes
|
{robotframework_logxml2chunks-1.1.4 → robotframework_logxml2chunks-1.1.6}/LogXML2Chunks/cli.py
RENAMED
|
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
|