I’m trying to assign groups to TestNG classes and methods in a Scala environment (in Eclipse)
@Test(groups="register")
class RegisterTest {
...
but am encountering the following error:
Multiple markers at this line
- type mismatch; found : java.lang.String("register") required:
Array[java.lang.String]
- annotation argument needs to be a constant; found: "register"{<error>}
I’ve tried applying groups to individual Scala methods but still encounter the same error.
Any suggestions on how to get around this?
The@Testannotation works as long as it doesn’t specify any parameters (same error if dependsOnMethodsparameter is specified).
@DataProviderannotation also works.
The ScalaDoc gives the following example:
That seems to match the error you get.