If this is a Groovy file, then
@Parameters({"userName",""})
Must be:
@Parameters(["userName",""])
or
@Parameters(["userName",""] as Object[])
Not sure I have not used TestNG. But you can definitely have some annotations on a node using Groovy, it's not like Groovy contains lists or arrays
source
share