Monilnarang opened a new pull request, #7295:
URL: https://github.com/apache/incubator-seata/pull/7295

   - [x] I have registered the PR [changes](../changes).
   
   
   ### Ⅰ. Describe what this PR did
   **Summary**: 
   - Parameterized tests : `testIsNullOrEmpty`, `testIsBlank`, `testIsNotBlank`
   
   **Elaboration**: 
   - The same method calls (`isNullOrEmpty`, `isBlank`, `isNotBlank`) were 
repeated multiple times with different inputs, making the test harder to 
maintain and extend. 
   - When a test fails, JUnit only shows which assertion failed, but not which 
specific input caused the failure.
   - Adding new test cases requires copying and pasting another block of 
statements instead of simply adding new data.
   
   To accomplish this, I retrofitted these tests into a parameterized unit 
test. This reduces duplication, allows easy extension by simply adding new 
value sets, and makes debugging easier as it clearly indicates which test 
failed instead of requiring a search through individual assertions.
   
   **Test execution results after changes:** 
   <img width="499" alt="Screenshot 2025-04-13 at 11 30 24 PM" 
src="https://github.com/user-attachments/assets/925702af-2613-4ba5-ae00-3cf96c58bcb8";
 />
   
   
   
   ### Ⅱ. Does this pull request fix one issue?
   <!-- If that, add "fixes #xxx" below in the next line, for example, fixes 
#97. -->
   
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)? 
   
   
   ### Ⅳ. Describe how to verify it
   Successful tests run
   
   ### Ⅴ. Special notes for reviews
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org
For additional commands, e-mail: notifications-h...@seata.apache.org

Reply via email to