D40223 After triggering Execution from OTOMA - #3695
Conversation
…se is getting generated & Execution details are not getting published into RQM
WalkthroughThe recent updates across various Ginger modules focus on enhancing error and log message clarity, refining conditions for exporting business flows, and ensuring consistency in status settings for nested objects. These changes improve the reliability and user feedback during ALM integration processes, making the system more intuitive and robust. Changes
Poem
|
There was a problem hiding this comment.
Actionable comments posted: 0
Out of diff range and nitpick comments (4)
Ginger/GingerCore/ALM/RQM/ExportToRQM.cs (4)
Line range hint
493-527: Clarify error messages for better user understanding.- result = $"At {GingerDicser.GetTermResValue(eTermResKey.RunSet)}: Cannot find test case with id {testCaseId} under Test Plan {businessFlow.Name} Test Plan Id: {businessFlow.ExternalID}"; + result = $"Cannot find test case with ID {testCaseId} under the Test Plan '{businessFlow.Name}' with Test Plan ID: {businessFlow.ExternalID}. Please verify the Test Case ID and Test Plan details.";The error messages could be more user-friendly by directly stating the problem and suggesting a verification step. This change makes the message clearer and more actionable for the user.
Line range hint
493-527: Ensure consistent error handling and user feedback.- Reporter.ToLog(eLogLevel.ERROR, $"At {GingerDicser.GetTermResValue(eTermResKey.RunSet)}: Cannot find test case with id {testCaseId} under Test Plan {businessFlow.Name} Test Plan Id: {businessFlow.ExternalID}"); + Reporter.ToLog(eLogLevel.ERROR, $"Cannot find test case with ID {testCaseId} under the Test Plan '{businessFlow.Name}' with Test Plan ID: {businessFlow.ExternalID}. Please verify the Test Case ID and Test Plan details.");The logging statements should match the updated error messages for consistency. This ensures that the logs are as clear and helpful as the user-facing messages.
Line range hint
493-527: Refactor method to reduce complexity and improve readability.Consider breaking down
GetExeResultforActivityGroupinto smaller, more manageable methods. This can improve readability and maintainability. For example, handling of test suite execution records and creation of execution records could be separated into distinct methods.
Line range hint
493-527: Simplify error handling inCreateExecutionRecord.- if (resultInfo != null && !string.IsNullOrEmpty(resultInfo.ErrorDesc)) + if (resultInfo?.ErrorDesc != null)Simplify the condition checks by using the null-conditional operator, which makes the code cleaner and easier to understand.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (4)
Ginger/GingerCore/DLLs/RQMExportStd.dllis excluded by!**/*.dll,!**/*.dllGinger/GingerCore/DLLs/RQM_RepositoryStd.dllis excluded by!**/*.dll,!**/*.dllGinger/GingerCoreNET/DLLS/RQMExportStd.dllis excluded by!**/*.dll,!**/*.dllGinger/GingerCoreNET/DLLS/RQM_RepositoryStd.dllis excluded by!**/*.dll,!**/*.dll
Files selected for processing (4)
- Ginger/GingerCore/ALM/RQM/ExportToRQM.cs (2 hunks)
- Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs (1 hunks)
- Ginger/GingerCoreNET/Run/RunSetActions/RunSetActionPublishToQCOperations.cs (2 hunks)
- Ginger/GingerCoreNET/RunLib/DynamicExecutionLib/DynamicExecutionManager.cs (1 hunks)
Additional Context Used
Learnings (1)
Ginger/GingerCore/ALM/RQM/ExportToRQM.cs (1)
User: prashelke URL: https://github.com/Ginger-Automation/Ginger/pull/3615 Timestamp: 2024-04-15T11:20:32.902Z Learning: The error handling for the `GetTestCaseFromActivityGroup` method in `ExportToRQM.cs` has been improved to handle cases where an activity group does not have any activities more gracefully.
Additional comments not posted (4)
Ginger/GingerCoreNET/Run/RunSetActions/RunSetActionPublishToQCOperations.cs (2)
25-25: Added import forGingerCore.Actions.This import is necessary for the changes in the method logic that involve
Actobjects.
205-210: Ensure consistency in activity status during copying.The changes correctly propagate the status from the original activities to their copies, which is crucial for accurate ALM reporting.
Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs (1)
247-248: Added logic to create activity group reports based on theToAttachActivitiesGroupReportflag.This addition allows for conditional generation of reports, enhancing flexibility and control over the reporting process during ALM exports.
Ginger/GingerCoreNET/RunLib/DynamicExecutionLib/DynamicExecutionManager.cs (1)
1622-1622: Ensure the new assignment forSearchALMEntityByNamealigns with expected ALM configurations.Verification successful
The search results indicate that the
SearchALMEntityByNameproperty is used consistently across different parts of the application, both in the backend logic and the UI. The property is properly propagated and bound to UI elements, and its changes are handled to reflect in the application state. This suggests that the implementation aligns with the expected behavior for ALM configurations.
- Ginger/GingerCoreNET/Run/RunSetActions/RunSetActionPublishToQCOperations.cs: Property used to set configuration for ALM publishing.
- Ginger/GingerCoreNET/RunLib/DynamicExecutionLib/DynamicExecutionManager.cs: Property values transferred between different operations, ensuring consistency.
- Ginger/GingerCoreCommon/Run/RunSetActions/RunSetActionPublishToQC.cs: Property defined with change notification.
- Ginger/Ginger/Run/RunSetActions/ExportResultsToALMConfigPage.xaml.cs: UI bindings and visibility managed based on this property.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `SearchALMEntityByName` setting is being used consistently across the application. # Test: Search for the usage of `SearchALMEntityByName`. Expect: Consistent usage across different ALM operations. rg --type cs 'SearchALMEntityByName'Length of output: 2283
…ublishExecutionFix
There was a problem hiding this comment.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs (1 hunks)
- Ginger/GingerCoreNET/Run/RunSetActions/RunSetActionPublishToQCOperations.cs (2 hunks)
Files skipped from review as they are similar to previous changes (2)
- Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs
- Ginger/GingerCoreNET/Run/RunSetActions/RunSetActionPublishToQCOperations.cs
…ithub.com/Ginger-Automation/Ginger into BugFix/D40223_OtomaRqmpublishExecutionFix
There was a problem hiding this comment.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- Ginger/GingerCoreNET/ALMLib/Generic/ALMCore.cs
…ublishExecutionFix
Every time new Test Case is getting generated & Execution details are not getting published into RQM
Thank you for your contribution.
Before submitting this PR, please make sure: