Question about @Parameters and java method reflection

Skip to first unread message

Brian Forester

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⇝

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

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 @
My Technical Scribblings @

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
To view this discussion on the web visit
Reply all
Reply to author
0 new messages