Spock 使用问题日志

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()
}
发布了63 篇原创文章 · 获赞 25 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/yangbo_hr/article/details/105079662