Using Groovy with Multiple TestNG Parameters -


i trying pass in multiple parameters testng annotated method class written in groovy. understand correct formats multiple testng parameters following:

@parameters({"category", "exampledesc"})           //option 1 @parameters(value = {"category", "exampledesc"})   //option 2 

however, i'm using groovy, see following error:

';', '}' or new line expected

if follow either option 1 or 2 in error see

cannot assigned 'class' 'string[]'.

this problem not exist when using java. there way pass in multiple parameters testng annotated methods groovy? curious, i'm using @dataprovider in area of code.

thank in advance! here's snitbit of code:

public class test {      @beforeclass      @parameters({"a", "b"})      public def before(a, b) { //code here }  } 

in groovy make list or array of strings, need use [] instead of {}, annotation becomes:

@parameters(["category", "exampledesc"]) 

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -