From ba0f39d959ba88d745f1790ec272e3d9faee687e Mon Sep 17 00:00:00 2001 From: tusharjadhav3302 Date: Fri, 24 Jul 2026 17:33:32 +0530 Subject: [PATCH] Fix Polarion test case ID matching in modifyE2ETags.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit jump.py builds the Polarion match key as "classname.name" and queries Polarion for entries matching those IDs. The XML produced by modifyE2ETags.py had classname="no-testclass" (Ginkgo's default, never overwritten) and an "OTP." prefix in the name (from the [OTP] tag). This produced IDs like "no-testclass.OTP.sig-installer.Suite_openshift_openstack..." which matched nothing in Polarion. The empty query result caused process_xml() to raise JumpException("Cannot proceed without xml with tempest results"). Strip the "OTP." prefix and split the formatted name at the first dot — first segment becomes classname, rest becomes name. This produces classname="sig-installer" and name="Suite_openshift_ openstack..", matching the 21 registered automation-test-ids (RHOSO-11212 through RHOSO-11266). Validated on serval70 with jump.py --dry_run=True (no --no-mapping). Tests matched correctly against Polarion entries. Related-Issue: OSPRH-32990 Co-authored-by: Cursor --- .../roles/tools_openshift_tests/scripts/modifyE2ETags.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/collection/tools/roles/tools_openshift_tests/scripts/modifyE2ETags.py b/collection/tools/roles/tools_openshift_tests/scripts/modifyE2ETags.py index 93348fc9..db8ab4f6 100644 --- a/collection/tools/roles/tools_openshift_tests/scripts/modifyE2ETags.py +++ b/collection/tools/roles/tools_openshift_tests/scripts/modifyE2ETags.py @@ -49,7 +49,14 @@ def format_test_case_name(s): ts.remove(tc) else: new_tc_name = format_test_case_name(tc_name) - tc.set('name', new_tc_name) + if new_tc_name.startswith('OTP.'): + new_tc_name = new_tc_name[4:] + if '.' in new_tc_name: + tc_classname, tc_name_rest = new_tc_name.split('.', 1) + tc.set('classname', tc_classname) + tc.set('name', tc_name_rest) + else: + tc.set('name', new_tc_name) print('TestCase added to output XML:', new_tc_name) ts.set('tests', str(len(ts.getchildren())))