我刚刚将应用程序从 grails 2.2.4 迁移到 grails 2.5.1。现在不执行 spock 测试。测试目录如下所示:
test
- unit
- FirstSpec
- SecondSpec
- ... (more Spock tests)
- functional
- FirstTests
- FirstSpec
- ... (more JUnit & Spock tests)
发生以下行为:
grails test-app unit:spock
does not run any test
grails test-app unit:
runs all spock unit tests
grails test-app functional:spock
does not run any tests
grails test-app functional:
runs only JUnit functional tests
对于 grails 2.2.4,所有测试都已执行。我遵循了 grails 主页上提供的迁移指南(删除 spock-plugin 等) 有谁知道问题出在哪里?
最佳答案
我遇到了同样的问题。此插件添加了对功能性 spock 测试的支持:https://grails.org/plugin/functional-spock
我不知道为什么默认不提供这个功能。
问候,Rumpel
关于grails 2.5.1 忽略了 Spock 功能测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32460421/