我添加了这个gradle任务
然后我收到此错误:
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]
我的语法出了什么问题?
我看到了这个教程:
test {
useJUnit {
includeCategories 'linqmap.users.interfaces.NoDbTests'
// excludeCategories 'org.gradle.junit.CategoryB'
}
}
答案 0 :(得分:1)
我应该使用"excludeCategories"
而不是"includeGroups()"
test {
useJUnit {
includeGroups 'linqmap.users.interfaces.NoDbTests'
// excludeGroups 'org.gradle.junit.CategoryB'
}
}
应该是
test {
useJUnit {
includeCategories 'linqmap.users.interfaces.NoDbTests'
}
}