No tests found 问题
环境:Gradle 6.2 + Spock-2.0-M2-groovy-3.0 + Groovy3.0.2
报告错误:
Execution failed for task ‘:test’.
No tests found for given includes: com.telecwin.gcl.client.api.message.vo.OnlineClientMessageTest (filter.includeTestsMatching)
解决办法:
在 build.gradle 脚本中添加一个配置,让 gradle 使用 junit5 的 platform 来执行 test 就可以了。如下:
test {
useJUnitPlatform()
}