Question about @Parameters and java method reflection

35 views
Skip to first unread message

Brian Forester

unread,
Jun 27, 2022, 1:16:37 PM6/27/22
to testng-users
Why does testng use the @Parameters annotation when it is possible to get the same information from java method reflection?  

Is it a performance reason?
Is it to allow the renaming of the parameters of the function?
Does it allow java signature method mismatches between what @Parameters says and the actual parameters of the method?

Just wondering since I'm writing some testng code for the first time.







⇜Krishnan Mahadevan⇝

unread,
Jul 4, 2022, 9:34:55 AM7/4/22
to testng-users
Brian,

The "@Parameters" annotation is intended to be able to facilitate receiving parameters from the suite xml file.  
The annotation serves as a means to indicate to TestNG that values for the method parameters are to be injected from suite file by TestNG and that the user (TestNG user) is not expected to do anything in specific.

If there are any specific questions around using it, please do post back the questions.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/f373f44c-b224-49f0-8fe0-ed270b6606f1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages