-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: enable syncing robot test cases with qase #2200
ci: enable syncing robot test cases with qase #2200
Conversation
Signed-off-by: Yang Chiu <[email protected]>
WalkthroughThe pull request modifies the Changes
Assessment against linked issues
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pipelines/utilities/junit_to_qase.py (1)
Line range hint
242-251
: Consider improving error handling and configuration management.While the changes work as intended, here are some suggestions to enhance the code:
- Add explicit error handling for unknown test types
- Consider moving suite IDs to configuration
- Add validation for the suite existence before use
Here's a suggested improvement:
+# At the top of the file with other constants +SUITE_IDS = { + "pytest": 58, # e2e-pytest + "robot": 89, # e2e-robot +} # decide it's a pytest or robot report test_suites = soup.find_all("testsuite") if test_suites[0].get("name") == "pytest": test_type = "pytest" - # if it's a pytest report, missing suites will be added under - # parent suite e2e-pytest (id=58) - parent_suite_id = 58 # e2e-pytest else: test_type = "robot" - # if it's a robot report, missing suites will be added under - # parent suite e2e-robot (id=89) - parent_suite_id = 89 # e2e-robot + +if test_type not in SUITE_IDS: + raise ValueError(f"Unsupported test type: {test_type}") + +parent_suite_id = SUITE_IDS[test_type] +print(f"Using parent suite ID {parent_suite_id} for {test_type}")
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pipelines/utilities/junit_to_qase.py
(1 hunks)
🔇 Additional comments (1)
pipelines/utilities/junit_to_qase.py (1)
249-251
: LGTM! The changes enable robot test case syncing as intended.
The implementation correctly assigns robot test cases to the "e2e-robot" suite (ID: 89), which aligns with the PR objective of enabling robot test case syncing with Qase.
Let's verify the Qase suite ID:
Which issue(s) this PR fixes:
Issue longhorn/longhorn#8853
What this PR does / why we need it:
enable syncing robot test cases with qase
Special notes for your reviewer:
Additional documentation or context
Summary by CodeRabbit
Bug Fixes
Documentation