Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

org.gradle.api.tasks.testing.junit.JUnitOptions.includeGroups() is applicable for argument types: (java.lang.String) values: [NoDbTests]

Tags:

java

junit

gradle

I have added this gradle task

and then I get this error:

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/eladb/WorkspaceQa/java/UsersServer/build.gradle' line: 98

* What went wrong:
A problem occurred evaluating root project 'UsersServer'.
> No signature of method: org.gradle.api.tasks.testing.junit.JUnitOptions.includeGroups() is applicable for argument types: (java.lang.String) values: [NoDbTests]

what is wrong with my syntax?

I saw this tutorial:

test {
    useJUnit {
          includeCategories 'linqmap.users.interfaces.NoDbTests'
    //    excludeCategories 'org.gradle.junit.CategoryB'
    }
}
like image 996
Elad Benda Avatar asked Nov 10 '22 07:11

Elad Benda


1 Answers

I should have used "excludeCategories" and not "includeGroups()"

test {
    useJUnit {
          includeGroups 'linqmap.users.interfaces.NoDbTests'
    //    excludeGroups 'org.gradle.junit.CategoryB'
    }
}

should be

test {
    useJUnit {
          includeCategories 'linqmap.users.interfaces.NoDbTests'
    }
}
like image 112
Elad Benda Avatar answered Nov 15 '22 06:11

Elad Benda