MOSIP- 44419: Removed reflection-based TestNG method name modification.#1344
Conversation
Signed-off-by: SradhaMohanty5899 <mohantysradha10@gmail.com>
WalkthroughUpdated a dependency version in pom.xml and refactored 13 test script files to replace reflection-based manipulation of TestNG internal result fields with direct attribute assignment via Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParamsAndBody.java (1)
122-128:⚠️ Potential issue | 🔴 CriticalPre-existing NPE:
ouputValidisnullwhen the_StatusCodebranch executes.Line 122 initializes
ouputValidtonull, and the_StatusCodebranch at line 128 callsouputValid.put(...)without ever assigning it aMapinstance. This will throw aNullPointerExceptionat runtime.🐛 Proposed fix
- Map<String, List<OutputValidationDto>> ouputValid = null; + Map<String, List<OutputValidationDto>> ouputValid = new java.util.HashMap<>();
🤖 Fix all issues with AI agents
In
`@api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePutForAutoGenId.java`:
- Around line 140-141: The method name sestResultTestName in class
SimplePutForAutoGenId is a typo and should be renamed to setResultTestName to
match other test scripts; rename the method (keeping its signature public void
setResultTestName(ITestResult result)) and update any references or annotations
that call it (e.g., `@AfterMethod` usage) so all files use the consistent
setResultTestName identifier.
MOSIP- 44419: Removed reflection-based TestNG method name modification.
Summary by CodeRabbit