when I add two annotations to a method like this
@Parameters({"userName",""})
@Test
public void replyMaster()
{
}
got this error
Multiple markers at this line
- Groovy:unexpected token: @ @ line 40, column 2.
- Duplicate field ReplyTest.@
- Groovy:The field '@' is declared multiple times.
my configuration:jdk 1.7,testng 6.8,groovy 2.0(installed with groovy eclipse plugin)
why?
If this is a Groovy file, then
@Parameters({"userName",""})
Should probably be:
@Parameters(["userName",""])
Or
@Parameters(["userName",""] as Object[])
Not sure, I haven't used TestNG. But you can definitely have multiple annotations per node with Groovy, it's just this isn't how groovy does lists or arrays
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With