Skip to content

[LCHIB-750] Fix robot subset to use file-level suite name as classname for nested suites#1320

Merged
Konboi merged 1 commit into
v1from
fix/LCHIB-750-robot-nested-classname-v1
Jun 8, 2026
Merged

[LCHIB-750] Fix robot subset to use file-level suite name as classname for nested suites#1320
Konboi merged 1 commit into
v1from
fix/LCHIB-750-robot-nested-classname-v1

Conversation

@Konboi

@Konboi Konboi commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Why

When Robot Framework tests are organized in subdirectories (e.g. tests/robot/api/*.robot), the parse_func in robot.py was assigning the directory-level suite name (e.g. Api, Integration) as the classname instead of the file-level suite name (e.g. Auth, Comments).

This caused the server-side RobotFrameworkResolver to fail because it tries to match Apiapi.robot, which doesn't exist. The actual files are auth.robot, comments.robot, etc.

What

Added a find_leaf_suites helper inside parse_func that recursively traverses the suite hierarchy until it reaches leaf suites (suites that contain <test> elements directly but no child <suite> elements). Only leaf suites — which correspond to individual .robot files — are passed to parse_suite, ensuring the correct file-level suite name is used as classname.

Before:

<testcase classname="Api" name="Register New User Successfully"/>

After:

<testcase classname="Auth" name="Register New User Successfully"/>

Also updated test fixtures (output.xml, record_test_result.json) to cover both flat (2-level) and nested (3-level) suite structures. The find_leaf_suites helper is recursive and handles any depth (2, 3, 4+ levels).

Please Review Here

  • test_record_test_legacy was already failing on v1 before this change (token/org mismatch in mock setup) — not related to this fix.

…sname for nested suites

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Konboi Konboi merged commit 7594967 into v1 Jun 8, 2026
14 checks passed
@Konboi Konboi deleted the fix/LCHIB-750-robot-nested-classname-v1 branch June 8, 2026 03:37
This was referenced Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant