testng - passing list as parmeters in testng.xml testng - passing list as parmeters in testng.xml xml xml

testng - passing list as parmeters in testng.xml


You can only pass basic types like this, so you should declare your last parameter as a "String" and then convert "{3, 4}" to a List. I suggest using "3 4" instead and simply parse it with String#split.

If you want to pass more complex parameters and you don't want to bother with converting, switch to using a @DataProvider.


From the manual, @Parameter can be used for simple parameters. For complex objects, you should look at @Dataprovider